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
FNST-OpenStack/horizon
openstack_dashboard/contrib/sahara/content/data_processing/job_binaries/tabs.py
25
1433
# 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 the...
apache-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Pygments-2.0.2/tests/test_examplefiles.py
4
4571
# -*- coding: utf-8 -*- """ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import os import pprint import difflib import pickle fr...
mit
anishnarang/gswift
swift/common/middleware/dlo.py
13
15388
# Copyright (c) 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
nhr/openshift-ansible
roles/lib_openshift/src/test/unit/test_oc_scale.py
39
8612
''' Unit tests for oc scale ''' import os import six import sys import unittest import mock # Removing invalid variable names for tests so that I can # keep them brief # pylint: disable=invalid-name,no-name-in-module # Disable import-error b/c our libraries aren't loaded in jenkins # pylint: disable=import-error # p...
apache-2.0
angelapper/edx-platform
openedx/core/djangoapps/coursegraph/tasks.py
2
12787
""" This file contains a management command for exporting the modulestore to neo4j, a graph database. """ from __future__ import unicode_literals, print_function import logging from celery import task from django.conf import settings from django.utils import six, timezone from opaque_keys.edx.keys import CourseKey fr...
agpl-3.0
wattad169/sportbuddy_server
lib/django/contrib/gis/sitemaps/kml.py
398
2544
from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.sitemaps import Sitemap from django.core import urlresolvers from django.db import models class KMLSitemap(Sitemap): """ A minimal hook to produce KML sitemaps. """ geo_format = 'kml' de...
bsd-3-clause
grilo/ansible-1
lib/ansible/modules/cloud/amazon/iam_group.py
24
14808
#!/usr/bin/python # 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...
gpl-3.0
R4stl1n/allianceauth
allianceauth/services/modules/teamspeak3/manager.py
3
12691
import logging from django.conf import settings from .util.ts3 import TS3Server, TeamspeakError from .models import TSgroup logger = logging.getLogger(__name__) class Teamspeak3Manager: def __init__(self): self._server = None @property def server(self): if self._server is not None and ...
gpl-2.0
junkcollector/PlexNMT-100
PlexNMT.py
1
3652
#!/usr/bin/env python """ PlexNMT Sources: PlexConnect: https://github.com/iBaa/PlexConnect/wiki inter-process-communication (queue): http://pymotw.com/2/multiprocessing/communication.html """ import sys, time from os import sep import socket from multiprocessing import Process, Pipe import signal, errno from Vers...
mit
Eric-Zhong/odoo
addons/mail/mail_followers.py
168
12482
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
xinjiguaike/edx-platform
lms/djangoapps/lti_provider/tests/test_tasks.py
36
4381
""" Tests for the LTI outcome service handlers, both in outcomes.py and in tasks.py """ import ddt from django.test import TestCase from mock import patch, MagicMock from student.tests.factories import UserFactory from lti_provider.models import GradedAssignment, LtiConsumer, OutcomeService import lti_provider.tasks ...
agpl-3.0
gormanb/mongo-python-driver
pymongo/periodic_executor.py
16
4679
# Copyright 2014-2015 MongoDB, 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 law or agreed to in writi...
apache-2.0
urueedi/openwrt
scripts/dl_cleanup.py
223
6094
#!/usr/bin/env python3 """ # OpenWrt download directory cleanup utility. # Delete all but the very last version of the program tarballs. # # Copyright (C) 2010-2015 Michael Buesch <m@bues.ch> # Copyright (C) 2013-2015 OpenWrt.org """ from __future__ import print_function import sys import os import re import getopt ...
gpl-2.0
clumsy/intellij-community
plugins/hg4idea/testData/bin/mercurial/templatefilters.py
90
12963
# template-filters.py - common template expansion filters # # Copyright 2005-2008 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ import cgi, re, os, time, urllib import encoding, ...
apache-2.0
EricNeedham/assignment-1
venv/lib/python2.7/site-packages/sqlalchemy/ext/mutable.py
22
23156
# ext/mutable.py # Copyright (C) 2005-2014 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 """Provide support for tracking of in-place changes to scalar values, which are propa...
mit
ilpianista/ansible
lib/ansible/cli/playbook.py
26
9115
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2018, Ansible Project # 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 import os import stat from ansible import c...
gpl-3.0
40223134/w16b_test
static/Brython3.1.3-20150514-095342/Lib/shutil.py
720
39101
"""Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat from os.path import abspath import fnmatch import collections import errno import tarfile try: import bz2 del bz2 _...
agpl-3.0
JTarball/docker-django-polymer-starter-kit
docker/app/app/backend/apps/_archive/blog_notsure_maybe_good_basic/models.py
5
1699
""" blog.models =========== Models file for a basic Blog App """ import logging from django.conf import settings from django.db import models from django.utils.translation import ugettext as _ from django.template.defaultfilters import slugify from blog.utils import markup # Get instance of logger lo...
isc
grupoprog3/proyecto_final
proyecto/flask/Lib/site-packages/setuptools/sandbox.py
17
14100
import os import sys import tempfile import operator import functools import itertools import re import contextlib import pickle from setuptools.extern import six from setuptools.extern.six.moves import builtins, map import pkg_resources if sys.platform.startswith('java'): import org.python.modules.posix.PosixMo...
apache-2.0
matiasb/django
tests/wsgi/tests.py
147
4142
from __future__ import unicode_literals import unittest from django.core.exceptions import ImproperlyConfigured from django.core.servers.basehttp import get_internal_wsgi_application from django.core.signals import request_started from django.core.wsgi import get_wsgi_application from django.db import close_old_conne...
bsd-3-clause
jmesteve/saas3
openerp/addons/portal/mail_thread.py
390
2004
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
mspark93/VTK
ThirdParty/Twisted/twisted/test/test_usage.py
30
20635
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.usage}, a command line option parsing library. """ from twisted.trial import unittest from twisted.python import usage class WellBehaved(usage.Options): optParameters = [['long', 'w', 'default', 'and a docstri...
bsd-3-clause
eceglov/phantomjs
src/breakpad/src/tools/gyp/pylib/gyp/__init__.py
137
17502
#!/usr/bin/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. import copy import gyp.input import optparse import os.path import re import shlex import sys # Default debug modes for GYP debug = {} # List ...
bsd-3-clause
annelisebouyer/datawrapper
test/api.test.py
1
4387
# # test script for Datawrapper API # import requests import os import json from random import randint import yaml config = yaml.load(open('../config.yaml').read()) domain = 'http://' + config['domain'] if 'DATAWRAPPER_DOMAIN' in os.environ: domain = os.environ['DATAWRAPPER_DOMAIN'] endpoint = domain + '/api/...
mit
cfangmeier/UNL-Gantry-Encapsulation-Monitoring
Logs2JSON.py
1
10923
#!/usr/bin/env python3 import io import re import json import pydoc import zipfile import traceback import argparse import collections from datetime import datetime import urllib.request as request from itertools import count Vec3d = collections.namedtuple('Vec3d', 'x,y,z') Orient3d = collections.namedtuple('Orient3d'...
mit
annatisch/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py
14
87215
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
nthien/pulp
server/test/unit/server/managers/auth/cert/test_cert_generator.py
10
4161
#!/usr/bin/python # # Copyright (c) 2011 Red Hat, Inc. # # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied...
gpl-2.0
silkyar/570_Big_Little
build/ARM/python/m5/internal/param_SimpleDisk.py
1
3934
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import d...
bsd-3-clause
TheeGrassHopper/zxcvbn
scripts/build_frequency_lists.py
2
7023
import os import time import codecs import urllib import simplejson import urllib2 from pprint import pprint SLEEP_TIME = 20 # seconds def get_ranked_english(): ''' wikitionary has a list of ~40k English words, ranked by frequency of occurance in TV and movie transcripts. more details at: http://en....
mit
philgyford/django-spectator
spectator/events/migrations/0042_auto_20200407_1039.py
1
1302
# Generated by Django 3.0.5 on 2020-04-07 10:39 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("spectator_events", "0041_event_ticket"), ] operations = [ migrations.AlterField( model_name="venue...
mit
nikolas/edx-platform
lms/djangoapps/courseware/tests/test_access.py
51
24303
# -*- coding: utf-8 -*- """ Test the access control framework """ import datetime import ddt import itertools import pytz from django.test import TestCase from django.core.urlresolvers import reverse from mock import Mock, patch from nose.plugins.attrib import attr from opaque_keys.edx.locations import SlashSeparatedC...
agpl-3.0
splav/servo
tests/wpt/web-platform-tests/fetch/api/resources/redirect.py
4
2674
import time from six.moves.urllib.parse import urlencode, urlparse def main(request, response): stashed_data = {'count': 0, 'preflight': "0"} status = 302 headers = [("Content-Type", "text/plain"), ("Cache-Control", "no-cache"), ("Pragma", "no-cache")] if "Origin" in requ...
mpl-2.0
40423143/2017springcd_hw
plugin/liquid_tags/audio.py
277
2161
""" Audio Tag --------- This implements a Liquid-style audio tag for Pelican, based on the pelican video plugin [1]_ Syntax ------ {% audio url/to/audio [url/to/audio] [/url/to/audio] %} Example ------- {% audio http://example.tld/foo.mp3 http://example.tld/foo.ogg %} Output ------ <audio controls><source src="http:...
gpl-3.0
jmehnle/ansible
lib/ansible/modules/network/avi/avi_seproperties.py
44
3509
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
tplusx/ns3-gpsr
src/point-to-point/bindings/modulegen__gcc_ILP32.py
34
331012
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
spotify/cobbler
koan/app.py
1
71889
""" koan = kickstart over a network a tool for network provisioning of virtualization (xen,kvm/qemu,vmware) and network re-provisioning of existing Linux systems. used with 'cobbler'. see manpage for usage. Copyright 2006-2008 Red Hat, Inc and Others. Michael DeHaan <michael.dehaan AT gmail> This program is free s...
gpl-2.0
Lazar-T/conference-crawler
openStack/spiders/openStackSpider.py
1
2023
# -*- coding: utf-8 -*- import urlparse from scrapy.http import Request from scrapy.loader import ItemLoader from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.loader.processors import Compose, MapCompose from w3lib.html import replace_escape_chars, remove_tags fr...
mit
40323250/bg9_cdw11
static/plugin/liquid_tags/graphviz.py
245
3198
""" GraphViz Tag --------- This implements a Liquid-style graphviz tag for Pelican. You can use different Graphviz programs like dot, neato, twopi etc. [1] [1] http://www.graphviz.org/ Syntax ------ {% graphviz <program> { <DOT code> } %} Examples -------- {% graphviz dot { digraph graph...
agpl-3.0
codeforsanjose/trash-pickup-portal
data/env/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/_compat.py
901
1253
# Copyright 2014 Donald Stufft # # 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, so...
mit
ClaudioNahmad/Servicio-Social
Parametros/CosmoMC/CosmoMC-master/python/deleteJobs.py
1
1785
from __future__ import absolute_import from __future__ import print_function import subprocess from paramgrid import batchjob_args, jobqueue Opts = batchjob_args.batchArgs('Delete running or queued jobs', importance=True, batchPathOptional=True) group = Opts.parser.add_mutually_exclusive_group() group.add_argument('-...
gpl-3.0
ltilve/chromium
media/tools/constrained_network_server/traffic_control_test.py
187
5943
#!/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. """End-to-end tests for traffic control library.""" import os import re import sys import unittest import traffic_control class...
bsd-3-clause
benpicco/mate-deskbar-applet
deskbar/ui/cuemiac/CuemiacEntry.py
1
5439
import gobject import gtk import deskbar.ui.iconentry # Make epydoc document signal __extra_epydoc_fields__ = [('signal', 'Signals')] class CuemiacEntry (deskbar.ui.iconentry.IconEntry): """ For all outside purposes this widget should appear to be a gtk.Entry with an icon inside it. Use it as such - if y...
gpl-2.0
Uli1/mapnik
scons/scons-local-2.4.0/SCons/Tool/packaging/tarbz2.py
1
1780
"""SCons.Tool.Packaging.tarbz2 The tarbz2 SRC packager. """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, includ...
lgpl-2.1
aimee-mft/revolve_25August_drupal
sites/all/libraries/proj4js/tools/toposort.py
261
8594
# # According to <http://www.vrplumber.com/programming/> this file # is licensed under a BSD-style license. We only use the section # originally by Tim Peters. # # TODO: The use of this code needs to be okayed by someone. # class RecursionError( OverflowError, ValueError ): '''Unable to calculate result because of...
gpl-2.0
utkbansal/kuma
kuma/search/exceptions.py
23
1048
from django.utils.encoding import force_text from rest_framework import status from rest_framework.exceptions import APIException def _force_text_recursive(data): """ Descend into a nested data structure, forcing any lazy translation strings into plain text. """ if isinstance(data, list): ...
mpl-2.0
emartonline/newfies-dialer
newfies/api/answercall_api.py
6
9469
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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) 2011-2012 Star2Billing S.L. # # The Initia...
mpl-2.0
GitYiheng/reinforcement_learning_test
test00_previous_files/mountaincar_q_learning.py
1
4304
import gym import os import sys import numpy as np import matplotlib import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from gym import wrappers from datetime import datetime from sklearn.pipeline import FeatureUnion from sklearn.preprocessing import StandardScaler from sklearn.kernel_approximation...
mit
mpasternak/pyglet-fix-issue-518-522
tools/epydoc/epydoc/markup/plaintext.py
8
2871
# # plaintext.py: plaintext docstring parsing # Edward Loper # # Created [04/10/01 12:00 AM] # $Id: plaintext.py 1444 2007-02-10 19:26:54Z dvarrazzo $ # """ Parser for plaintext docstrings. Plaintext docstrings are rendered as verbatim output, preserving all whitespace. """ __docformat__ = 'epytext en' from epydoc.m...
bsd-3-clause
ndardenne/pymatgen
pymatgen/vis/tests/test_structure_vtk.py
2
1222
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ Created on Apr 25, 2012 """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Sh...
mit
TOTVS/mdmpublic
couchbase-cli/lib/python/pysnappy2/snappy_cffi.py
1
7457
import sys from cffi import FFI if sys.hexversion > 0x03000000: unicode = str ffi = FFI() ffi.cdef(''' typedef enum { SNAPPY_OK = 0, SNAPPY_INVALID_INPUT = 1, SNAPPY_BUFFER_TOO_SMALL = 2 } snappy_status; typedef uint32_t crc_t; int snappy_compress(const char* input, size_t input_leng...
bsd-2-clause
ddy88958620/lib
Python/scrapy/myotcstore/justotc.py
2
2203
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from urllib import urlencode import csv from product_spiders.items import Produc...
apache-2.0
fracpete/wekamooc
moredataminingwithweka/class-4.2.py
1
2966
# 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 hope that it will be useful, # bu...
gpl-3.0
cctaylor/googleads-python-lib
examples/adwords/v201506/campaign_management/set_criterion_bid_modifier.py
3
2536
#!/usr/bin/python # # 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 b...
apache-2.0
aemerick/galaxy_analysis
particle_analysis/sn_rate.py
1
9054
#import yt.mods as yt import yt import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np import glob __all__ = ['future_snr', 'snr'] _core_collapse_labels = ["SNII", "II", "2", "SN_II", "TypeII", "Type 2", "Type II", "type II", "typeII", 'core collapse'] _...
mit
CodeMonkeyJan/hyperspy
hyperspy/_components/error_function.py
4
2432
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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
cqhtyi/ADfree-Player-Offline
onServer/ruletool/oredirectlist.py
1
3038
[ { "name": "youkujson", "find": "https?:\/\/val[fcopb]\.atm\.youku\.com\/v[fcopb]", "replace": "about:blank", "extra": "adkillrule" }, { "name": "youkuloader", "find": "https?:\/\/static\.youku\.com(\/v[\d\.]*)?\/v\/swf\/.*\/loaders?\.swf", "exfind": ...
gpl-3.0
ArnossArnossi/django
tests/invalid_models_tests/test_relative_fields.py
108
53554
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import warnings from django.core.checks import Error, Warning as DjangoWarning from django.db import models from django.test import ignore_warnings from django.test.testcases import skipIfDBFeature from django.test.utils import override_settings from d...
bsd-3-clause
dkerwin/ansible-modules-core
cloud/amazon/ec2_vol.py
22
19222
#!/usr/bin/python # 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...
gpl-3.0
handroissuazo/tensorflow
tensorflow/python/saved_model/main_op.py
120
1320
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
piskvorky/gensim
gensim/scripts/word2vec2tensor.py
4
3848
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2018 Vimig Socrates <vimig.socrates@gmail.com> # Copyright (C) 2016 Loreto Parisi <loretoparisi@gmail.com> # Copyright (C) 2016 Silvio Olivastri <silvio.olivastri@gmail.com> # Copyright (C) 2016 Radim Rehurek <radim@rare-technologies.com> """This script ...
lgpl-2.1
tharunkalwa/pympler
test/muppy/test_refbrowser.py
3
8637
import doctest import gc import os import sys import unittest from tempfile import mkstemp from pympler import refbrowser from pympler.util.compat import StringIO class TreeTest(unittest.TestCase): # sample tree used in output tests sample_tree = None TREE_DEP_1 = """ root-+-branch1 +-branch2 ...
apache-2.0
Mariusz-v7/MZCreeper
upload_all.py
1
4210
#-*- coding: utf-8 -*- import time import getpass import os from selenium import webdriver from selenium.webdriver.support.ui import Select max_wait_time = 60 #page_url = "http://gamesstats.hopto.org/" #page_url = "http://gamesstats.loc/" def login(driver): file_ = open("config/upload") page_url = file_.re...
gpl-2.0
cloudsigma/cloud-init
cloudinit/config/cc_resizefs.py
5
5697
# vi: ts=4 expandtab # # Copyright (C) 2011 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify # it...
gpl-3.0
spacy-io/sense2vec
bin/cythonize.py
1
6170
#!/usr/bin/env python """ cythonize Cythonize pyx files into C files as needed. Usage: cythonize [root_dir] Default [root_dir] is 'spacy'. Checks pyx files to see if they have been changed relative to their corresponding C files. If they have, then runs cython on these files to recreate the C files. The script th...
mit
broferek/ansible
lib/ansible/module_utils/ecs/api.py
66
16236
# -*- coding: utf-8 -*- # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is licensed under the # Modified BSD License. Modules you write using this snippet, which is embedded # dynamically by Ansible, still belong to the author of the module, ...
gpl-3.0
pgmillon/ansible
lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py
15
13242
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
2ndQuadrant/ansible
lib/ansible/modules/network/netvisor/pn_cpu_mgmt_class.py
47
3923
#!/usr/bin/python # Copyright: (c) 2018, Pluribus Networks # 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': '1.1', 'status': ['p...
gpl-3.0
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/dns/rrset.py
99
5895
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
medallia/voldemort
clients/python/voldemort/serialization/ordered_dict.py
23
1612
class OrderedDict(dict): def __init__(self, args=None, **kwargs): dict.__init__(self) self.keyList = [] if args: if isinstance(args, dict): for k, v in args.iteritems(): self[k] = v else: for k, v in args: ...
apache-2.0
jeremiah-c-leary/vhdl-style-guide
vsg/rules/single_space_before_token.py
1
1995
from vsg import parser from vsg import rule from vsg import violation from vsg.rules import utils as rules_utils class single_space_before_token(rule.Rule): ''' Checks for a single space between two tokens. Parameters ---------- name : string The group the rule belongs to. identifi...
gpl-3.0
clouserw/zamboni
mkt/comm/tests/test_commands.py
10
9417
from django.core.management import call_command from nose.tools import eq_, ok_ import mkt from mkt.comm.models import CommunicationNote, CommunicationThread from mkt.constants import comm from mkt.developers.models import ActivityLog, ActivityLogAttachment from mkt.site.fixtures import fixture from mkt.site.tests im...
bsd-3-clause
mwiebe/numpy
numpy/polynomial/tests/test_chebyshev.py
123
18026
"""Tests for chebyshev module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.chebyshev as cheb from numpy.polynomial.polynomial import polyval from numpy.testing import ( TestCase, assert_almost_equal, assert_raises, assert_equal, assert_, run_...
bsd-3-clause
firstjob/python-social-auth
social/backends/trello.py
76
1513
""" Trello OAuth1 backend, docs at: http://psa.matiasaguirre.net/docs/backends/trello.html """ from social.backends.oauth import BaseOAuth1 class TrelloOAuth(BaseOAuth1): """Trello OAuth authentication backend""" name = 'trello' ID_KEY = 'username' AUTHORIZATION_URL = 'https://trello.com/1/OAuthA...
bsd-3-clause
h4ck3rm1k3/binutils-gdb
gdb/python/lib/gdb/frames.py
26
8031
# Frame-filter commands. # Copyright (C) 2013-2016 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any late...
gpl-2.0
mrrrgn/olympia
lib/video/utils.py
44
1190
import subprocess def check_output(*popenargs, **kwargs): # Tell thee, check_output was from Python 2.7 untimely ripp'd. # check_output shall never vanquish'd be until # Marketplace moves to Python 2.7. if 'stdout' in kwargs: raise ValueError('stdout argument not allowed, it will be overridden...
bsd-3-clause
Lindy21/CSE498-LRS
lrs/urls.py
1
1256
from django.conf.urls import patterns, include, url urlpatterns = patterns('lrs.views', url(r'^$', 'home'), url(r'^statements/more/(?P<more_id>.{32})$', 'statements_more'), url(r'^statements', 'statements'), url(r'^activities/state', 'activity_state'), url(r'^activities/profile', 'activity_profile'...
apache-2.0
twalthr/flink
flink-python/docs/conf.py
10
7148
################################################################################ # 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...
apache-2.0
slarosa/QGIS
python/plugins/sextante/gdal/polygonize.py
3
2791
# -*- coding: utf-8 -*- """ *************************************************************************** polygonize.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
gpl-2.0
fengbaicanhe/intellij-community
python/lib/Lib/encodings/mac_cyrillic.py
593
13710
""" Python Character Mapping Codec mac_cyrillic generated from 'MAPPINGS/VENDORS/APPLE/CYRILLIC.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_table) def decode(self,inp...
apache-2.0
techdragon/django
tests/template_tests/filter_tests/test_upper.py
388
1245
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import upper from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class UpperTests(SimpleTestCase): """ The "upper" filter messes up entities (which a...
bsd-3-clause
skycucumber/Messaging-Gateway
webapp/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py
169
12468
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import gettext _ = gettext.gettext try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import rcdataElement...
gpl-2.0
chaowyc/youtube-dl
youtube_dl/extractor/canalc2.py
145
1258
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class Canalc2IE(InfoExtractor): IE_NAME = 'canalc2.tv' _VALID_URL = r'http://.*?\.canalc2\.tv/video\.asp\?.*?idVideo=(?P<id>\d+)' _TEST = { 'url': 'http://www.canalc2.tv/video.asp?idVideo=12163&v...
unlicense
mou4e/zirconium
third_party/typ/typ/fakes/tests/test_result_server_fake_test.py
81
1298
# Copyright 2014 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 ag...
bsd-3-clause
joshrule/LOTlib
LOTlib/Hypotheses/Proposers/RegenerationProposal.py
1
1997
"""Regenerate proposals - chooses a node of type X and replaces it with a newly sampled value of type X. """ from LOTlib.BVRuleContextManager import BVRuleContextManager from LOTlib.FunctionNode import FunctionNode, NodeSamplingException from LOTlib.Hypotheses.Proposers import ProposalFailedException from LOTlib.Mis...
gpl-3.0
kubeflow/pipelines
components/arena/docker/utils.py
3
4385
import argparse import datetime import json import os import sys import logging import requests import subprocess import six import time import yaml from subprocess import Popen,PIPE from shlex import split def setup_custom_logging(): logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s', ...
apache-2.0
insiderr/insiderr-app
ios-patches/basemodules/twisted/web/domhelpers.py
60
8562
# -*- test-case-name: twisted.web.test.test_domhelpers -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A library for performing interesting tasks with DOM objects. """ import StringIO from twisted.web import microdom from twisted.web.microdom import getElementsByTagName, escape, unesc...
gpl-3.0
AdamWill/bodhi
bodhi/server/services/packages.py
1
2320
# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-2.0
brchiu/tensorflow
tensorflow/python/autograph/converters/list_comprehensions.py
47
2295
# 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
oscarforri/WebServices_Json
server.py
1
3555
#!flask/bin/python from flask import Flask, jsonify, abort, make_response, request from resources import posts, todos, comments, albums, photos, users app = Flask(__name__) @app.errorhandler(404) def not_found(error): return make_response(jsonify({'error': 'Not found'}), 404) @app.errorhandler(400) def bad_requ...
gpl-3.0
osvalr/odoo
addons/l10n_fr/report/bilan_report.py
374
6196
# -*- coding: utf-8 -*- # # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users w...
agpl-3.0
SIFTeam/enigma2
lib/python/SIFTeam/Settings/Categories.py
2
3000
from enigma import * from Screens.Screen import Screen from Components.config import config from Components.ActionMap import ActionMap from Components.Button import Button from Components.Pixmap import Pixmap from Components.Sources.List import List from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from...
gpl-2.0
bswartz/cinder
cinder/tests/unit/backup/fake_google_client2.py
14
3732
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2016 Vedams Inc. # Copyright (C) 2016 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 ...
apache-2.0
SnappleCap/oh-mainline
vendor/packages/scrapy/scrapy/tests/test_utils_defer.py
26
3576
from twisted.trial import unittest from twisted.internet import reactor, defer from twisted.python.failure import Failure from scrapy.utils.defer import mustbe_deferred, process_chain, \ process_chain_both, process_parallel, iter_errback class MustbeDeferredTest(unittest.TestCase): def test_success_function(...
agpl-3.0
hpcleuven/easybuild-easyblocks
easybuild/easyblocks/f/fsl.py
2
4458
## # Copyright 2009-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
zvezdan/pip
src/pip/_vendor/chardet/langcyrillicmodel.py
272
17948
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
atramos/facebook-photo-sync
facebook/requests/packages/chardet/gb2312prober.py
2994
1681
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
20tab/django-filer
filer/utils/filer_easy_thumbnails.py
12
3444
#-*- coding: utf-8 -*- from easy_thumbnails.files import Thumbnailer import os import re from filer import settings as filer_settings # match the source filename using `__` as the seperator. ``opts_and_ext`` is non # greedy so it should match the last occurence of `__`. # in ``ThumbnailerNameMixin.get_thumbnail_name``...
bsd-3-clause
iglpdc/dmrg_helpers
scripts/append_metadata_from_xml.py
1
2434
#!/usr/bin/env python """Appends metadata to estimators files reading from input xml files. The current version of the DMRG does not include any metadata into the estimator files. Metadata are comment lines that have information about the run the estimator was obtained from, such as the value of the Hamiltonian parame...
mit
metamath/set.mm
scripts/iset-match.py
1
1795
#!/usr/bin/env python3 # iset-match.py: Report where iset.mm statements differ from set.mm. # Author: David A. Wheeler # SPDX-License-Identifier: MIT import os,re # Generate list of statements in set.mm and iset.mm. os.system("metamath 'read set.mm' 'set width 9999' 'show statement *' quit > ,set-mm-statements") os.s...
cc0-1.0
gemmaan/moviesenal
Hasil/Lib/site-packages/pip/_vendor/distlib/markers.py
1261
6282
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # """Parser for the environment markers micro-language defined in PEP 345.""" import ast import os import sys import platform from .compa...
mit