repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
foodsnag/foodsnag-web
config.py
1
1242
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: APP_NAME = 'FoodSnag' MAILER_NAME = 'Snagger' MAILER_EMAIL = 'snagger@foodsnag.com' MG_KEY = os.environ.get('MG_KEY') MG_URL = 'https://api.mailgun.net/v3/sandbox86fa708b0be84193924a6900094a11cf.mailgun.org' SECRET_KE...
mit
fr34k8/paimei
pida/basic_block.py
7
9145
# # PIDA Basic Block # Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com> # # $Id: basic_block.py 194 2007-04-05 15:31:53Z cameron $ # # 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; ...
gpl-2.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/grizzled/grizzled/proxy.py
19
3984
# NOTE: Documentation is intended to be processed by epydoc and contains # epydoc markup. """ Overview ======== The ``grizzled.forwarder`` module contain classes that make building proxies easier. """ from __future__ import absolute_import __docformat__ = "restructuredtext en" # -----------------------------------...
lgpl-3.0
Mariusz1970/enigma2
lib/python/Screens/Ipkg.py
65
3790
from Components.ActionMap import ActionMap from Components.Ipkg import IpkgComponent from Components.Label import Label from Components.Slider import Slider from Screens.Screen import Screen from Screens.MessageBox import MessageBox from enigma import eTimer class Ipkg(Screen): def __init__(self, session, cmdList=Non...
gpl-2.0
VanirAOSP/kernel_samsung_codinalte
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed 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 failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
avirshup/DockerMake
test/helpers.py
1
5035
import os import io import tarfile import sys import pytest import docker.errors __client = None if sys.version_info.major == 2: file_not_found_error = IOError else: file_not_found_error = FileNotFoundError def get_client(): """ Returns: docker.DockerClient """ global __client i...
apache-2.0
fujunwei/chromium-crosswalk
tools/auto_bisect/bisect_results_test.py
8
12580
# Copyright 2014 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 os import unittest from bisect_results import BisectResults import source_control class MockDepotRegistry(object): def ChangeToDepotDir(self, dep...
bsd-3-clause
eonpatapon/rally
rally/plugins/openstack/scenarios/ceilometer/queries.py
14
4521
# 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
dneg/gaffer
python/GafferUI/TransformPlugValueWidget.py
5
2819
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Red...
bsd-3-clause
HyperloopTeam/FullOpenMDAO
lib/python2.7/site-packages/pycrypto-2.3-py2.7-macosx-10.10-x86_64.egg/Crypto/SelfTest/Hash/test_MD2.py
11
2251
# -*- coding: utf-8 -*- # # SelfTest/Hash/MD2.py: Self-test for the MD2 hash function # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication ...
gpl-2.0
rrahn/gdf_tools
include/seqan/util/py_lib/seqan/dddoc/core.py
18
37011
#!/usr/bin/env python import copy import operator import os import os.path import pickle import string import sys # Constant for C++ files. FILETYPE_CPP = 2 # Constant for DDDOC files. FILETYPE_DDDOC = 1 # Constant for none of the above. FILETYPE_OTHER = 0 SOURCE_ENCODING = 'iso8859-1' # Extension of C++ files. CPP...
gpl-3.0
bmhatfield/Diamond
src/collectors/slony/test/testslony.py
31
3625
#!/usr/bin/python # coding=utf-8 ############################################################################### from test import CollectorTestCase from test import get_collector_config from test import run_only from mock import patch from slony import SlonyCollector def run_only_if_psycopg2_is_available(func): ...
mit
operasoftware/presto-testo
wpt/websockets/autobahn/oberstet-Autobahn-643d2ee/demo/streaming/frame_based_server.py
4
1803
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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 ## ## ht...
bsd-3-clause
gsssrao/MozDef
docker/conf/config.py
14
1961
#!/usr/bin/env python # 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/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Anthony Verez averez@mozilla.com fro...
mpl-2.0
janeyuhui/volatilitux
core/config.py
8
4033
from .kernel_struct import * from .raw_dump import * from .fingerprint import * from xml.dom.minidom import parse, Document import os.path CONFIG_VERSION = 1.0 class Config: init_task = None arch = None offsets = {} dumpfile = None debug = False @classmethod def setDebug(cls, debug=False): ...
gpl-2.0
tquizzle/Sick-Beard
sickbeard/clients/transmission.py
30
4145
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
gpl-3.0
kevclarx/ansible
lib/ansible/modules/packaging/os/openbsd_pkg.py
50
26182
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrik Lundin <patrik@sigterm.se> # # 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 Lic...
gpl-3.0
12mo2525/angularMail
node_modules/node-gyp/gyp/gyptest.py
1752
8019
#!/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. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import subprocess import sys class CommandRunner(obje...
mit
CadishShank/Ardour-5.0.2.0-Cad
tools/cstyle.py
12
9136
#!/usr/bin/python -tt # # Copyright (C) 2005-2012 Erik de Castro Lopo <erikd@mega-nerd.com> # # Released under the 2 clause BSD license. """ This program checks C code for compliance to coding standards used in libsndfile and other projects I run. """ import re import sys class Preprocessor: """ Preprocess lines ...
gpl-2.0
bwsblake/lettercounter
django-norel-env/lib/python2.7/site-packages/django/db/models/sql/datastructures.py
118
1115
""" Useful auxilliary data structures for query construction. Not useful outside the SQL domain. """ class EmptyResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was attempted (if the caller wants to treat that ...
mit
rahimnathwani/django-countries
django_countries/ioc_data.py
6
3977
IOC_TO_ISO = { 'AFG': 'AF', 'ALB': 'AL', 'ALG': 'DZ', 'AND': 'AD', 'ANG': 'AO', 'ANT': 'AG', 'ARG': 'AR', 'ARM': 'AM', 'ARU': 'AW', 'ASA': 'AS', 'AUS': 'AU', 'AUT': 'AT', 'AZE': 'AZ', 'BAH': 'BS', 'BAN': 'BD', 'BAR': 'BB', 'BDI': 'BI', 'BEL': 'BE',...
mit
pytest-dev/pytest
doc/en/conf.py
2
13237
# # pytest documentation build configuration file, created by # sphinx-quickstart on Fri Oct 8 17:54:28 2010. # # 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 values hav...
mit
testbetta/git-repo-pub
subcmds/rebase.py
16
4796
# # Copyright (C) 2010 The Android Open Source Project # # 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 la...
apache-2.0
TheBoegl/letsencrypt
tests/letstest/multitester.py
1
20830
""" Letsencrypt Integration Test Tool - Configures (canned) boulder server - Launches EC2 instances with a given list of AMIs for different distros - Copies letsencrypt repo and puts it on the instances - Runs letsencrypt tests (bash scripts) on all of these - Logs execution and success/fail for debugging Notes: - ...
apache-2.0
XXLRay/linux-2.6.32-rhel6.x86_64
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
jjbrophy47/sn_spam
independent/scripts/independent.py
1
6452
""" Module containing the Independent class to handle all operations pertaining to the independent model. """ import os import pandas as pd class Independent: """Returns an Independent object that reads in the data, splits into sets, trains and classifies, and writes the results.""" def __init__(self, co...
mit
josesanch/django-oscar
sites/demo/apps/order/south_migrations/0003_auto__del_field_ordernote_date__add_field_ordernote_date_created__add_.py
16
32376
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.utils.timezone import now class Migration(SchemaMigration): def forwards(self, orm): db.rename_column('order_ordernote', 'date', 'date_created') # Addi...
bsd-3-clause
kashif/chainer
tests/chainer_tests/links_tests/activation_tests/test_simplified_dropconnect.py
1
9315
import os import tempfile import unittest import numpy import chainer from chainer import cuda from chainer import gradient_check from chainer import links from chainer.serializers import npz from chainer import testing from chainer.testing import attr from chainer.testing import condition from chainer.utils import t...
mit
PanDAWMS/panda-jedi
pandajedi/jediddm/DDMInterface.py
1
2256
from pandajedi.jediconfig import jedi_config from pandajedi.jedicore import Interaction # interface to DDM class DDMInterface: # constructor def __init__(self): self.interfaceMap = {} # setup interface def setupInterface(self): # parse config for configStr in jedi_config.ddm....
apache-2.0
pwoodworth/intellij-community
python/lib/Lib/email/Parser.py
392
3300
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw, Thomas Wouters, Anthony Baxter # Contact: email-sig@python.org """A parser of RFC 2822 and MIME email messages.""" __all__ = ['Parser', 'HeaderParser'] import warnings from cStringIO import StringIO from email.feedparser import FeedParser ...
apache-2.0
lanen/youtube-dl
youtube_dl/extractor/kickstarter.py
111
2654
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class KickStarterIE(InfoExtractor): _VALID_URL = r'https?://www\.kickstarter\.com/projects/(?P<id>[^/]*)/.*' _TESTS = [{ 'url': 'https://www.kickstarter.com/projects/1404461844/intersection-the-story-of-josh-g...
unlicense
chromium/gyp
pylib/gyp/generator/gypsh.py
2779
1665
# Copyright (c) 2011 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. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
bsd-3-clause
jarrahwu/tornado
tornado/log.py
82
9819
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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
yodalee/servo
tests/wpt/web-platform-tests/eventsource/resources/cors-cookie.py
248
1220
from datetime import datetime def main(request, response): last_event_id = request.headers.get("Last-Event-Id", "") ident = request.GET.first('ident', "test") cookie = "COOKIE" if ident in request.cookies else "NO_COOKIE" origin = request.GET.first('origin', request.headers["origin"]) credentials =...
mpl-2.0
jhonatajh/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/configurations/inheritance/gyptest-inheritance.py
430
1047
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies build of an executable in three different configurations. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('configur...
gpl-3.0
danieljaouen/ansible
lib/ansible/module_utils/scaleway.py
6
4276
import json import sys from ansible.module_utils.basic import env_fallback from ansible.module_utils.urls import fetch_url def scaleway_argument_spec(): return dict( api_token=dict(required=True, fallback=(env_fallback, ['SCW_TOKEN', 'SCW_API_KEY', 'SCW_OAUTH_TOKEN', 'SCW_API_TOKEN']), ...
gpl-3.0
jfpla/odoo
addons/purchase/stock.py
111
18604
# -*- 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
ojengwa/grr
lib/flows/general/timelines.py
5
2754
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Calculates timelines from the client.""" from grr.lib import aff4 from grr.lib import data_store from grr.lib import flow from grr.lib import rdfvalue from grr.lib import utils from grr.proto import flows_pb2 class MACTimesArgs(rdfvalue.RDFPro...
apache-2.0
rocky/python-xdis
test_unit/test_marsh.py
1
1343
#!/usr/bin/env python import os, unittest from xdis.load import load_module def get_srcdir(): filename = os.path.normcase(os.path.dirname(os.path.abspath(__file__))) return os.path.realpath(filename) srcdir = get_srcdir() class TestMarshal(unittest.TestCase): def test_basic(self): """Tests xdi...
gpl-2.0
robwarm/gpaw-symm
doc/devel/bigpicture.py
1
9152
"""creates: bigpicture.svg bigpicture.png""" import os from math import pi, cos, sin import numpy as np import matplotlib #matplotlib.use('Agg') import matplotlib.patches as mpatches import matplotlib.pyplot as plt class Box: def __init__(self, name, description=(), attributes=(), color='grey'): self.na...
gpl-3.0
mtp1376/youtube-dl
youtube_dl/extractor/liveleak.py
14
4214
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import int_or_none class LiveLeakIE(InfoExtractor): _VALID_URL = r'https?://(?:\w+\.)?liveleak\.com/view\?(?:.*?)i=(?P<id>[\w_]+)(?:.*)' _TESTS = [{ 'url': 'http://www.liveleak.com/view?i=757...
unlicense
yekeqiang/luigi
test/instance_wrap_test.py
4
3011
# Copyright (c) 2012 Spotify AB # # 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, s...
apache-2.0
DESHRAJ/fjord
vendor/packages/html5lib/html5lib/html5parser.py
95
115775
try: frozenset except NameError: # Import from the sets module for python 2.3 from sets import Set as set from sets import ImmutableSet as frozenset try: any except: # Implement 'any' for python 2.4 and previous def any(iterable): for element in iterable: if element: ...
bsd-3-clause
UrusTeam/android_ndk_toolchain_cross
lib/python2.7/test/test_with.py
88
26440
#!/usr/bin/env python """Unit tests for the with statement specified in PEP 343.""" __author__ = "Mike Bland" __email__ = "mbland at acm dot org" import sys import unittest from collections import deque from contextlib import GeneratorContextManager, contextmanager from test.test_support import run_unittest class...
gpl-2.0
preete-dixit-ck/incubator-airflow
tests/contrib/hooks/test_ssh_hook.py
14
2342
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
photoninger/ansible
lib/ansible/modules/crypto/openssl_csr.py
9
20902
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, Yanis Guenane <yanis+ansible@guenane.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
gpl-3.0
LumPenPacK/NetworkExtractionFromImages
osx_build/nefi2_osx_amd64_xcode_2015/site-packages/networkx/tests/test_convert_pandas.py
43
2177
from nose import SkipTest from nose.tools import assert_true import networkx as nx class TestConvertPandas(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): try: import pandas as pd except ImportError: ...
bsd-2-clause
fxfitz/ansible
lib/ansible/modules/network/radware/vdirect_file.py
14
9277
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 Radware LTD. # # 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...
gpl-3.0
openstack/tacker
tacker/db/migration/__init__.py
3
3774
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
apache-2.0
zrong/wpcmd
wpcmd/mde/ditaa.py
2
4539
""" A Python Markdown extension to convert plain-text diagrams to images. """ # The MIT License (MIT) # # Copyright (c) 2014 Sergey Astanin # # 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...
bsd-3-clause
c2corg/v6_api
c2corg_api/views/user_follow.py
1
4832
import logging from c2corg_api import DBSession from c2corg_api.models.feed import FollowedUser from c2corg_api.views import cors_policy, restricted_json_view from c2corg_api.views.document_listings import get_documents_for_ids from c2corg_api.views.document_schemas import user_profile_documents_config from c2corg_api...
agpl-3.0
saurabh6790/omni-apps
patches/may_2013/p02_update_valuation_rate.py
30
1376
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes def execute(): from stock.stock_ledger import update_entries_after item_warehouse = [] # update valuation_rate in transaction doc...
agpl-3.0
openstack/heat
heat/tests/autoscaling/test_heat_scaling_policy.py
1
8756
# # 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 # ...
apache-2.0
raymondgom/pmip6ns3.13new
src/network/bindings/modulegen__gcc_ILP32.py
32
498757
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
maxive/erp
addons/l10n_eu_service/__manifest__.py
26
2279
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'EU Mini One Stop Shop (MOSS)', 'category': 'Localization', 'description': """ EU Mini One Stop Shop (MOSS) VAT for telecommunications, broadcasting and electronic services =========================...
agpl-3.0
Hawaii-Smart-Energy-Project/Smart-Grid-PV-Inverter
test/test_insert_single_meter_data_file.py
1
5700
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Daniel Zhang (張道博)' __copyright__ = 'Copyright (c) 2014, University of Hawaii Smart Energy Project' __license__ = 'https://raw.github.com/Hawaii-Smart-Energy-Project/Smart-Grid' \ '-PV-Inverter/master/BSD-LICENSE.txt' import unittest from inser...
bsd-3-clause
imruahmed/microblog
flask/lib/python2.7/site-packages/pip/exceptions.py
280
1257
"""Exceptions used throughout package""" from __future__ import absolute_import class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class ...
bsd-3-clause
creativecommons/cc.license
bootstrap.py
299
5686
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
mit
abdulbaqi/quranf
venv/lib/python2.7/site-packages/werkzeug/exceptions.py
148
18577
# -*- coding: utf-8 -*- """ werkzeug.exceptions ~~~~~~~~~~~~~~~~~~~ This module implements a number of Python exceptions you can raise from within your views to trigger a standard non-200 response. Usage Example ------------- :: from werkzeug.wrappers import BaseRequest ...
mit
jmouriz/sanaviron
doc/api/source/conf.py
3
9479
# -*- coding: utf-8 -*- # # Sanaviron documentation build configuration file, created by # sphinx-quickstart on Mon Sep 17 17:01:35 2012. # # 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. # # A...
apache-2.0
sambitgaan/nupic
external/linux32/lib/python2.6/site-packages/pytz/__init__.py
69
30648
''' datetime.tzinfo timezone definitions generated from the Olson timezone database: ftp://elsie.nci.nih.gov/pub/tz*.tar.gz See the datetime section of the Python Library Reference for information on how to use these modules. ''' # The Olson database has historically been updated about 4 times a year OLSON_VERSI...
agpl-3.0
felipenaselva/felipe.repository
script.module.placenta/lib/resources/lib/modules/trakt.py
1
17250
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want wit...
gpl-2.0
nside/appcrawl
appcrawl/spiders/playstore.py
1
3616
from scrapy.selector import HtmlXPathSelector from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.contrib.spiders import CrawlSpider, Rule from appcrawl.items import AppItem, AppStoreItem from scrapy.http import Request import datetime import re class PlaystoreSpider(CrawlSpider): def gen...
bsd-2-clause
prutseltje/ansible
lib/ansible/plugins/callback/stderr.py
59
3194
# (c) 2017, Frederic Van Espen <github@freh.be> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callbac...
gpl-3.0
srvg/ansible-modules-extras
identity/ipa/ipa_sudocmdgroup.py
28
8567
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
gpl-3.0
cgwalters/anaconda
pyanaconda/ui/gui/spokes/storage.py
1
41626
# Storage configuration spoke classes # # Copyright (C) 2011-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...
gpl-2.0
pbrunet/pythran
pythran/analyses/range_values.py
3
10642
""" Module Analysing code to extract positive subscripts from code. """ # TODO check bound of while and if for more occurate values. import ast import copy from pythran.analyses import Globals, Aliases from pythran.intrinsic import Intrinsic from pythran.passmanager import FunctionAnalysis from pythran.range import ...
bsd-3-clause
supertom/ansible
lib/ansible/plugins/callback/context_demo.py
29
2079
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.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 lat...
gpl-3.0
pigeonflight/strider-plone
docker/appengine/lib/django-1.5/django/contrib/staticfiles/management/commands/runserver.py
243
1343
from optparse import make_option from django.conf import settings from django.core.management.commands.runserver import Command as RunserverCommand from django.contrib.staticfiles.handlers import StaticFilesHandler class Command(RunserverCommand): option_list = RunserverCommand.option_list + ( make_optio...
mit
phoebusliang/parallel-lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/urlpatterns_reverse/urls.py
105
3133
from django.conf.urls.defaults import * from views import empty_view, absolute_kwargs_view other_patterns = patterns('', url(r'non_path_include/$', empty_view, name='non_path_include'), ) urlpatterns = patterns('', url(r'^places/(\d+)/$', empty_view, name='places'), url(r'^places?/$', empty_view, name="pl...
gpl-3.0
sniperyen/MyDjango
xadmin/plugins/editable.py
9
6739
from django import template from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models, transaction from django.forms.models import modelform_factory from django.http import Http404, HttpResponse from django.utils.encoding import force_unicode, smart_unicode from django.utils.h...
apache-2.0
elysium001/zamboni
mkt/feed/tests/test_models.py
9
10673
# -*- coding: utf-8 -*- import random import string from itertools import cycle from django.core.exceptions import ValidationError import mock from nose.tools import eq_, ok_ import mkt.site.tests import mkt.feed.constants as feed from mkt.feed.models import (FeedApp, FeedBrand, FeedCollection, FeedItem, ...
bsd-3-clause
leiferikb/bitpop
src/third_party/WebKit/Source/bindings/scripts/idl_validator.py
1
5029
# Copyright (C) 2013 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 ...
gpl-3.0
Livit/Livit.Learn.EdX
common/test/acceptance/tests/studio/test_import_export.py
13
16914
""" Acceptance tests for the Import and Export pages """ from nose.plugins.attrib import attr from datetime import datetime from flaky import flaky from abc import abstractmethod from bok_choy.promise import EmptyPromise from .base_studio_test import StudioLibraryTest, StudioCourseTest from ...fixtures.course import...
agpl-3.0
sfromm/ansible-report
alembic/versions/2f3bd55d88a_base_tables.py
1
1299
"""base tables Revision ID: 2f3bd55d88a Revises: None Create Date: 2013-04-22 15:26:47.296443 """ # revision identifiers, used by Alembic. revision = '2f3bd55d88a' down_revision = None from ansiblereport.model import JSONEncodedDict from alembic import op import sqlalchemy as sa def upgrade(): ### commands au...
gpl-3.0
vFense/vFenseAgent-nix
agent/deps/rpm6-32/Python-2.7.5/lib/python2.7/lib-tk/test/test_ttk/test_extensions.py
88
9186
import sys import unittest import Tkinter import ttk from test.test_support import requires, run_unittest import support requires('gui') class LabeledScaleTest(unittest.TestCase): def setUp(self): support.root_deiconify() def tearDown(self): support.root_withdraw() def test_widget_des...
lgpl-3.0
Jeff20/sklearn_pycon2015
notebooks/fig_code/svm_gui.py
47
11549
""" ========== Libsvm GUI ========== A simple graphical frontend for Libsvm mainly intended for didactic purposes. You can create data points by point and click and visualize the decision region induced by different kernels and parameter settings. To create positive examples click the left mouse button; to create neg...
bsd-3-clause
Dima73/pli-openmultibootmanager
src/OMBManagerAbout.py
1
2459
############################################################################# # # Copyright (C) 2014 Impex-Sat Gmbh & Co.KG # Written by Sandro Cavazzoni <sandro@skanetwork.com> # All Rights Reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public...
gpl-2.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/logilab/common/table.py
93
31408
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
agpl-3.0
joshloyal/scikit-learn
examples/feature_selection/plot_f_test_vs_mi.py
75
1647
""" =========================================== Comparison of F-test and mutual information =========================================== This example illustrates the differences between univariate F-test statistics and mutual information. We consider 3 features x_1, x_2, x_3 distributed uniformly over [0, 1], the targ...
bsd-3-clause
foo123/sikuli-framework
examples/calculator/baseline/os/mac/Calculator/Calculator,lcdDisplay-0.py
2
1952
""" Copyright (c) 2013, SMART Technologies ULC 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 an...
bsd-3-clause
groundhogxc/XCSoar
python/test/test_xcsoar.py
37
2408
#!/usr/bin/env python import xcsoar import argparse from pprint import pprint # Parse command line parameters parser = argparse.ArgumentParser( description='Please give me a IGC file name...') parser.add_argument('file_name', type=str) args = parser.parse_args() print "Init xcsoar.Flight, don't store flight in...
gpl-2.0
CanalTP-Cityway/apii_sim_engine
source/apiisim/tests/mis_translator/test_mis_api_stub.py
1
4320
#!/usr/bin/python # -*- encoding: utf8 -*- import os import unittest import json from datetime import timedelta, datetime from apiisim import tests from apiisim.common import AlgorithmEnum, TransportModeEnum from apiisim.common.plan_trip import LocationStructure from apiisim.common.mis_plan_trip import ItineraryRespon...
agpl-3.0
Rio517/pledgeservice
lib/requests/api.py
361
4344
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. Retur...
apache-2.0
spring-week-topos/nova-week
nova/tests/api/openstack/compute/test_limits.py
12
35781
# 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...
apache-2.0
jswope00/GAI
lms/envs/acceptance.py
2
6284
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 from .test import * from .sauce import * # You ...
agpl-3.0
justbrowsing/justbrowsing-adeskbar
src/adesk/0bar.py
1
33894
# -*- coding: utf-8 -*- # python modules import os import sys # extra modules import gtk import cairo import gobject import traceback try: import keybinder KEYBINDER_PRESENT = True except: KEYBINDER_PRESENT = False # adeskbar modules import ui import barconf import config import desktop import core ...
gpl-3.0
obulpathi/reversecoin
misc/tools/bitcoin_genesis.py
2
4836
#!/usr/bin/env python import binascii from bitcoin.core import COutPoint, CTxIn, CTxOut, CTransaction, CBlock coinbase = "04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73" scriptPubKeyHex = "4104678afdb0fe55482...
gpl-2.0
electrolinux/weblate
weblate/trans/views/source.py
9
4827
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
gpl-3.0
savi-dev/nova
nova/db/sqlalchemy/migrate_repo/versions/101_security_group_instance_association_uses_uuid.py
8
2540
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # Copyright 2012 Michael Still and Canonical 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 ...
apache-2.0
abelkhan/websearch
websearch/chardet/charsetprober.py
3127
1902
######################## 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...
gpl-3.0
INNUENDOCON/INNUca
src/SPAdes-3.10.1-Linux/share/spades/joblib2/format_stack.py
18
16314
""" Represent an exception with a lot of information. Provides 2 useful functions: format_exc: format an exception into a complete traceback, with full debugging instruction. format_outer_frames: format the current position in the stack call. Adapted from IPython's VerboseTB. """ # Authors: Gael Varoqua...
gpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/nltk/featstruct.py
12
100854
# Natural Language Toolkit: Feature Structures # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu>, # Rob Speer, # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sourceforge.net> # For license information, see LICENSE.TXT """ Basic data classes for...
agpl-3.0
r3tard/BartusBot
lib/setuptools/command/egg_info.py
301
16852
"""setuptools.command.egg_info Create a distribution's .egg-info directory and contents""" from distutils.filelist import FileList as _FileList from distutils.util import convert_path from distutils import log import distutils.errors import distutils.filelist import os import re import sys try: from setuptools_s...
apache-2.0
jjinux/party-playlist-picker
third-party/gdata/tlslite/VerifierDB.py
359
3104
"""Class for storing SRP password verifiers.""" from utils.cryptomath import * from utils.compat import * import mathtls from BaseDB import BaseDB class VerifierDB(BaseDB): """This class represent an in-memory or on-disk database of SRP password verifiers. A VerifierDB can be passed to a server handshake...
apache-2.0
evgchz/scikit-learn
sklearn/ensemble/gradient_boosting.py
6
63474
"""Gradient Boosted Regression Trees This module contains methods for fitting gradient boosted regression trees for both classification and regression. The module structure is the following: - The ``BaseGradientBoosting`` base class implements a common ``fit`` method for all the estimators in the module. Regressio...
bsd-3-clause
lfz/Guided-Denoise
Attackset/Iter8_v3_resv2_inresv2_random/attack_iter.py
4
10757
"""Implementation of sample attack.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from scipy.misc import imread from scipy.misc import imsave from nets import inception_v3, inception_v4, inception_resnet_v2, resnet_v2 fro...
apache-2.0
nanophotonics/nplab
nplab/utils/array_with_attrs.py
1
3536
# -*- coding: utf-8 -*- """ Created on Tue May 26 08:08:14 2015 @author: rwb27 """ import numpy as np class AttributeDict(dict): """This class extends a dictionary to have a "create" method for compatibility with h5py attrs objects.""" def create(self, name, data): self[name] = data ...
gpl-3.0
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.4/django/db/backends/postgresql_psycopg2/base.py
81
9415
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import sys from django.db import utils from django.db.backends import * from django.db.backends.signals import connection_created from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations from...
mit
snowdream1314/scrapy
tests/test_spider.py
53
13990
import gzip import inspect import warnings from io import BytesIO from testfixtures import LogCapture from twisted.trial import unittest from scrapy import signals from scrapy.settings import Settings from scrapy.http import Request, Response, TextResponse, XmlResponse, HtmlResponse from scrapy.spiders.init import In...
bsd-3-clause