repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
migonzalvar/youtube-dl
youtube_dl/extractor/srf.py
102
4254
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, parse_iso8601, xpath_text, ) class SrfIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.srf\.ch/play(?:er)?/tv/[^/]+/video/(?P<display_id>[^?]+)\?id=|tp\.srgssr\.c...
unlicense
jjneely/current
cwebapp/cwebapp/controllers.py
1
2632
import xmlrpclib import turbogears import auth import cherrypy.config from turbogears import controllers class SubDir(object): def __init__(self, api): self._api = api class Policy(SubDir): @turbogears.expose(html="cwebapp.templates.policy") @auth.needsLogin def index(self, userInfo): ...
gpl-2.0
ncrocfer/weevely3
core/config.py
14
1572
# Base path for log files and sessions base_path = '~/.weevely/' # History path history_path = '~/.weevely/history' # Session path sessions_path = '~/.weevely/sessions/' sessions_ext = '.session' # Supported Channels channels = [ # Steganographed cover channel inside Referrer # introduced in Weevely 3.0beta....
gpl-3.0
blueintegral/SmarterBoard
VideoCapture-0.9-5/Python23/Lib/VideoCapture.py
7
8158
"""VideoCapture.py by Markus Gritsch <gritsch@iue.tuwien.ac.at> """ import vidcap from PIL import Image, ImageFont, ImageDraw import time, string default_textpos = 'bl' # t=top, b=bottom; l=left, c=center, r=right textcolor = 0xffffff shadowcolor = 0x000000 def now(): """Returns a string containing the curre...
bsd-2-clause
guorendong/iridium-browser-ubuntu
build/android/pylib/perf/setup.py
35
2847
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates test runner factory and tests for performance tests.""" import json import fnmatch import logging import os import shutil from pylib import co...
bsd-3-clause
oliverlee/sympy
sympy/utilities/exceptions.py
93
5777
""" General SymPy exceptions and warnings. """ from __future__ import print_function, division import warnings from sympy.utilities.misc import filldedent class SymPyDeprecationWarning(DeprecationWarning): r"""A warning for deprecated features of SymPy. This class is expected to be used with the warnings....
bsd-3-clause
sureleo/leetcode
archive/python/array/NextPermutation.py
2
1060
#Thought about swap element in the array but it was a chaos #Get it from here:http://fisherlei.blogspot.com/2012/12/leetcode-next-permutation.html #actually these code allocated extra memory for copying list #will try to optimize this in C++ class Solution: # @param num, a list of integer # @return a list of in...
mit
syphar/django
tests/inspectdb/tests.py
14
14971
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import re from unittest import skipUnless from django.core.management import call_command from django.db import connection from django.test import TestCase, mock, skipUnlessDBFeature from django.utils.encoding import force_text from django.utils.six im...
bsd-3-clause
kevinr/750book-web
750book-web-env/lib/python2.7/site-packages/kombu/utils/functional.py
13
1325
class promise(object): """A promise. Evaluated when called or if the :meth:`evaluate` method is called. The function is evaluated on every access, so the value is not memoized (see :class:`mpromise`). Overloaded operations that will evaluate the promise: :meth:`__str__`, :meth:`__repr__`, ...
mit
sitian/wing
services/wview/dialog.py
1
4347
# dialog.py # # Copyright (C) 2013 Yi-Wei Ci <ciyiwei@hotmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # ...
gpl-2.0
carlitux/gaebuild
src/gaebuild/dist_installer.py
1
11331
import os import sys import shutil import tempfile from glob import glob from distutils import log from distutils.errors import DistutilsError from distutils.errors import DistutilsArgError from distutils.sysconfig import get_config_vars from setuptools import Command from setuptools.dist import Distribution from se...
bsd-3-clause
singingwolfboy/invoke
tests/config.py
3
20445
import os from os.path import join, expanduser from spec import eq_, ok_, raises from mock import patch, call from invoke.config import Config from invoke.exceptions import ( AmbiguousEnvVar, UncastableEnvVar, UnknownFileType ) from invoke.vendor import six from _utils import IntegrationSpec CONFIGS_PATH = 'co...
bsd-2-clause
anfelder/ardupilot
Tools/LogAnalyzer/tests/TestAutotune.py
265
4748
from LogAnalyzer import Test,TestResult import DataflashLog # from ArduCopter/defines.h AUTOTUNE_INITIALISED = 30 AUTOTUNE_OFF = 31 AUTOTUNE_RESTART = 32 AUTOTUNE_SUCCESS = 33 AUTOTUNE_FAILED = 34 AUTOTUNE_REACHED_LIMIT = 35 AUTOTUNE_PILOT_TESTING = 36 AUTOTUN...
gpl-3.0
wso2-dev/device-cloud-appliances
IU_workshop/Step 7/python_client/ControlAndPublish/BAMPythonPublisher/thrift/server/TProcessPoolServer.py
94
3966
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
lixt/lily2-gem5
src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py
85
2513
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
rvalyi/OpenUpgrade
addons/mrp_operations/mrp_operations.py
33
27326
# -*- 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
tundebabzy/frappe
frappe/desk/form/linked_with.py
2
5714
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json from frappe.model.meta import is_single from frappe.modules import load_doctype_module import frappe.desk.form.meta import frappe.desk.form.load from six impor...
mit
GaryKriebel/osf.io
scripts/tests/test_clear_sessions.py
51
1467
from nose.tools import * # noqa from tests.base import OsfTestCase class TestClearSessions(OsfTestCase): @classmethod def setUpClass(cls): super(TestClearSessions, cls).setUpClass() cls.session_collection = Session._storage[0].store def setUp(self): super(TestClearSessions, self...
apache-2.0
tumbl3w33d/ansible
test/units/modules/storage/netapp/test_na_ontap_service_processor_network.py
23
8298
''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ansible.module_utils import basic from ansible.module_utils._text import to_bytes import ansible.module_utils.netapp as n...
gpl-3.0
Justin-Yuan/Image2Music-Generator
library/jython2.5.3/Lib/test/test_imp.py
33
1113
import imp from test.test_support import TestFailed, TestSkipped try: import thread except ImportError: raise TestSkipped("test only valid when thread support is available") def verify_lock_state(expected): if imp.lock_held() != expected: raise TestFailed("expected imp.lock_held() to be %r" % expec...
gpl-2.0
ericzundel/commons
src/python/twitter/common/java/constant.py
15
5769
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
squideyes/Lean
Algorithm.Python/LimitFillRegressionAlgorithm.py
8
2369
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Li...
apache-2.0
statik/grr
client/client_actions/linux/linux.py
6
15903
#!/usr/bin/env python """Linux specific actions.""" import ctypes import ctypes.util import logging import os import pwd import stat import subprocess import tempfile import time from grr.client import actions from grr.client import client_utils_common from grr.client.client_actions import standard from grr.client.c...
apache-2.0
thdb-theo/Zombie-Survival
tests/test_cython.py
1
1613
import unittest import math from collections import namedtuple from random import randint, random import sys import os sys.path.insert(0, os.getcwd() + "/src") try: from cython_ import angle_between as cyangle_between, collide as cycollide no_cython = False except ImportError: no_cython = True ...
mit
EMATech/python-for-android
src/buildlib/jinja2.egg/jinja2/_stringdefs.py
17
468990
# -*- coding: utf-8 -*- """ jinja2._stringdefs ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project, original implementation from Pygments. :co...
lgpl-2.1
andrewcbennett/iris
lib/iris/analysis/__init__.py
1
83243
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
gpl-3.0
reunition/reunition
reunition/apps/reunions/forms.py
1
2426
from django import forms as f from . import models as m GRADUATION_FIRST_NAME_FIELD = lambda : f.CharField(max_length=100, label='First name at graduation') GRADUATION_LAST_NAME_FIELD = lambda : f.CharField(max_length=100, label='Last name at graduation') CURRENT_FIRST_NAME_FIELD = lambda : f.CharField(max_length=10...
mit
wrouesnel/ansible
lib/ansible/modules/cloud/amazon/aws_waf_facts.py
66
4164
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' module: aws...
gpl-3.0
Yuliang-Zou/Automatic_Group_Photography_Enhancement
lib/roi_data_layer/layer.py
1
2481
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """The data layer used during training to train a Fast R-CNN network. ...
mit
JoshLabs/django-allauth
allauth/account/admin.py
63
1045
import django from django.contrib import admin from .models import EmailConfirmation, EmailAddress from .adapter import get_adapter class EmailAddressAdmin(admin.ModelAdmin): list_display = ('email', 'user', 'primary', 'verified') list_filter = ('primary', 'verified') search_fields = [] raw_id_fields...
mit
MarkusHackspacher/pyLottoSimu
tests/test_show_drawing.py
1
5812
# -*- coding: utf-8 -*- # pyLottoSimu # Copyright (C) <2015-2019> Markus Hackspacher # This file is part of pyLottoSimu. # pyLottoSimu 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 th...
gpl-3.0
SunDwarf/curious
curious/ipc/packet.py
1
3764
# This file is part of curious. # # curious 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 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
mit
Sp1l/mod_h2
test/e2e/test_002_curl_basics.py
1
3174
# # mod-h2 test suite # check that we can use curl to make HTTP/2 requests against our server # import copy import re import sys import time import pytest from datetime import datetime from TestEnv import TestEnv from TestHttpdConf import HttpdConf def setup_module(module): print("setup_module: %s" % module.__na...
apache-2.0
neuroidss/nupic.studio
nupic_studio/ui/main_form.py
1
19037
import sys import time import webbrowser from PyQt4 import QtGui, QtCore from nupic_studio import MachineState from nupic_studio.htm import maxPreviousSteps, maxPreviousStepsWithInference from nupic_studio.ui import Global from nupic_studio.ui.project_properties_form import ProjectPropertiesForm class MainFor...
gpl-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pycparser/ply/lex.py
98
42889
# ----------------------------------------------------------------------------- # ply: lex.py # # Copyright (C) 2001-2015, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
gpl-3.0
proxysh/Safejumper-for-Desktop
buildmac/Resources/env/lib/python2.7/site-packages/cffi/verifier.py
56
11518
# # DEPRECATED: implementation for ffi.verify() # import sys, os, binascii, shutil, io from . import __version_verifier_modules__ from . import ffiplatform if sys.version_info >= (3, 3): import importlib.machinery def _extension_suffixes(): return importlib.machinery.EXTENSION_SUFFIXES[:] else: imp...
gpl-2.0
ecreall/nova-ideo
novaideo/views/user_management/login.py
1
6018
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi # TODO: finish to clean, use our own templates, ... ? import datetime import pytz from pyramid.view import view_config from pyramid.httpexceptions import ( HTTPForb...
agpl-3.0
phenoxim/nova
nova/policies/base.py
5
1382
# 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 # d...
apache-2.0
gptech/ansible
lib/ansible/modules/storage/zfs/zpool_facts.py
69
6653
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@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 L...
gpl-3.0
mglukhikh/intellij-community
python/helpers/py2only/docutils/languages/fi.py
148
2026
# $Id: fi.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Asko Soukka <asko.soukka@iki.fi> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated f...
apache-2.0
gadomski/cpd
vendor/googletest-release-1.10.0/googlemock/scripts/generator/cpp/tokenize.py
473
9752
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
gpl-2.0
Windy-Ground/scikit-learn
examples/ensemble/plot_feature_transformation.py
67
4285
""" =============================================== Feature transformations with ensembles of trees =============================================== Transform your features into a higher dimensional, sparse space. Then train a linear model on these features. First fit an ensemble of trees (totally random trees, a rand...
bsd-3-clause
zouyapeng/horizon-newtouch
openstack_dashboard/test/test_data/ceilometer_data.py
12
8354
# Copyright 2012 Canonical Ltd. # # 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
alshedivat/tensorflow
tensorflow/python/training/ftrl.py
9
12151
# 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
zotherstupidguy/bitcoin
qa/rpc-tests/test_framework/key.py
168
7366
# Copyright (c) 2011 Sam Rushing # # key.py - OpenSSL wrapper # # This file is modified from python-bitcoinlib. # """ECC secp256k1 crypto routines WARNING: This module does not mlock() secrets; your private keys may end up on disk in swap! Use with caution! """ import ctypes import ctypes.util import hashlib import ...
mit
jeffreyling/seq2seq-hard
preprocess.py
1
18561
#!/usr/bin/env python # -*- coding: utf-8 -*- """Create the data for the LSTM. """ import os import sys import argparse import numpy as np import h5py import itertools from collections import defaultdict class Indexer: def __init__(self, symbols = ["<blank>","<unk>","<s>","</s>"]): self.vocab = defaultdi...
mit
markhice/ghost-casper
node_modules_bak/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/styles/monokai.py
364
5080
# -*- coding: utf-8 -*- """ pygments.styles.monokai ~~~~~~~~~~~~~~~~~~~~~~~ Mimic the Monokai color scheme. Based on tango.py. http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details....
mit
emijrp/youtube-dl
youtube_dl/extractor/walla.py
123
2814
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( xpath_text, int_or_none, ) class WallaIE(InfoExtractor): _VALID_URL = r'http://vod\.walla\.co\.il/[^/]+/(?P<id>\d+)/(?P<display_id>.+)' _TEST = { 'url': 'http://vod.walla...
unlicense
frankyrumple/smc
modules/pytube/models.py
1
4454
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from os.path import normpath, isfile from os import remove from time import clock try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen from .utils import sizeof from os.path i...
mit
waytai/odoo
addons/l10n_in_hr_payroll/wizard/__init__.py
430
1110
# -*- 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
schmit/sheepherding
sheepherding/ai/learning.py
1
3054
''' These classes are based on starter code from CS 221 class at Stanford ''' import collections, random from math import sqrt # Abstract class: an RLAlgorithm performs reinforcement learning. All it needs # to know is the set of available actions to take. The simulator (see # simulate()) will call getAction() to g...
mit
willingc/oh-mainline
vendor/packages/Django/django/db/models/sql/aggregates.py
195
3977
""" Classes to represent the default SQL aggregate functions """ from django.db.models.fields import IntegerField, FloatField # Fake fields used to identify aggregate types in data-conversion operations. ordinal_aggregate_field = IntegerField() computed_aggregate_field = FloatField() class Aggregate(object): """...
agpl-3.0
zaw9c1/p2pool
SOAPpy/WSDL.py
294
5100
"""Parse web services description language to get SOAP methods. Rudimentary support.""" ident = '$Id: WSDL.py 1467 2008-05-16 23:32:51Z warnes $' from version import __version__ import wstools import xml from Errors import Error from Client import SOAPProxy, SOAPAddress from Config import Config import urllib class...
gpl-3.0
ancafarcas/superdesk-core
apps/validators/tests.py
5
1368
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
agpl-3.0
gylian/sickbeard
sickbeard/clients/requests/packages/charade/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
gpl-3.0
golems/amino
demo/tutorial/python/t3.0-scene.py
1
1124
#!/usr/bin/env python # File: t3-scene.py # ================= # # Create a scene with a grid and three boxes. Display the scene in # the viewer window. from amino import SceneWin, SceneGraph, Geom, QuatTrans, GeomOpt # Create a window win = SceneWin(start=False) # Create an (empty) scene graph sg = SceneGraph() #...
bsd-3-clause
nerevu/riko
riko/modules/split.py
1
3964
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.modules.split ~~~~~~~~~~~~~~~~~~ Provides functions for splitting a stream into identical copies Use split when you want to perform different operations on data from the same stream. The Union module is the reverse of Split, it merges multiple input streams i...
mit
GabrielNicolasAvellaneda/dd-agent
checks.d/nginx.py
12
6316
# stdlib import re import urlparse # 3rd party import requests import simplejson as json # project from checks import AgentCheck from util import headers class Nginx(AgentCheck): """Tracks basic nginx metrics via the status module * number of connections * number of requets per second Requires ngin...
bsd-3-clause
mediatum/mediatum
lib/audio/asf.py
1
20773
# Copyright 2006-2007 Lukas Lalinsky # Copyright 2005-2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # $Id: asf.py,v 1.1 2010/05/18 15:12:56 seiferta Exp $ """...
gpl-3.0
mlaitinen/odoo
addons/report/models/report.py
168
26320
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
django/djangopeople
djangopeople/djangopeople/groupedselect.py
2
2937
from django import forms from django.forms.utils import flatatt from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ # From http://www.djangosnippets.org/snippets/200/ # widget for select with optional opt groups # modified from ticket 34...
mit
mikf/gallery-dl
gallery_dl/extractor/manganelo.py
1
4865
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Extractors for https://manganato.com/""" from .common import ChapterExtractor, MangaExtractor from .. impo...
gpl-2.0
rosmo/ansible
lib/ansible/modules/network/onyx/onyx_bgp.py
30
19451
#!/usr/bin/python # # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
mcanthony/rethinkdb
external/v8_3.30.33.16/build/gyp/pylib/gyp/generator/eclipse.py
437
11894
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
agpl-3.0
BondAnthony/ansible
lib/ansible/modules/group.py
6
19813
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Stephen Fromm <sfromm@gmail.com> # 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 DOCUMENTATION = ''' --- module: group v...
gpl-3.0
apixandru/intellij-community
python/lib/Lib/site-packages/django/core/urlresolvers.py
87
17256
""" This module converts requested URLs to callback view functions. RegexURLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a tuple in this format: (view_function, function_args, function_kwargs) """ import re from django.http import Http404 from django.conf import se...
apache-2.0
gijskant/phdthesis-experiments
scripts/tools.py
1
19097
#! /usr/bin/env python # :noTabs=true: # (c) Copyright (c) 2017 Gijs Kant # (c) This file is distributed under the MIT License, # (c) see the file LICENSE. """ tools.py Brief: Utility classes for tools used in the experiments. Author: Gijs Kant <gijskant@protonmail.com> """ import os import shutil import glob impor...
mit
Jgarcia-IAS/localizacion
openerp/addons/base/module/wizard/base_import_language.py
337
2644
# -*- 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
mancoast/CPythonPyc_test
cpython/271_test_class.py
17
17763
"Test the functionality of Python classes implementing operators." import unittest from test import test_support testmeths = [ # Binary operations "add", "radd", "sub", "rsub", "mul", "rmul", "div", "rdiv", "mod", "rmod", "divmod", "rdivmod", "pow", "rpow", ...
gpl-3.0
rui-castro/Sick-Beard
lib/hachoir_parser/audio/id3.py
90
16721
""" ID3 metadata parser, supported versions: 1.O, 2.2, 2.3 and 2.4 Informations: http://www.id3.org/ Author: Victor Stinner """ from lib.hachoir_core.field import (FieldSet, MatchError, ParserError, Enum, UInt8, UInt24, UInt32, CString, String, RawBytes, Bit, Bits, NullBytes, NullBits) from lib.hachoir_c...
gpl-3.0
IONISx/edx-platform
cms/djangoapps/contentstore/management/commands/tests/test_create_course.py
137
2495
""" Unittests for creating a course in an chosen modulestore """ import unittest import ddt from django.core.management import CommandError, call_command from contentstore.management.commands.create_course import Command from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import...
agpl-3.0
xq262144/hue
desktop/core/ext-py/kazoo-2.0/kazoo/recipe/party.py
54
3886
"""Party :Maintainer: Ben Bangert <ben@groovie.org> :Status: Production A Zookeeper pool of party members. The :class:`Party` object can be used for determining members of a party. """ import uuid from kazoo.exceptions import NodeExistsError, NoNodeError class BaseParty(object): """Base implementation of a pa...
apache-2.0
rowillia/buck
programs/buck_tool.py
2
19250
from __future__ import print_function import errno import json import os import platform import re import shlex import signal import signal import subprocess import sys import tempfile import textwrap import time import traceback from pynailgun import NailgunConnection, NailgunException from timing import monotonic_ti...
apache-2.0
egoid/baytree
lib/python2.7/site-packages/django/db/backends/oracle/compiler.py
59
2044
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def as_sql(self, with_limits=True, with_col_aliases=False, subquery=False): """ Creates the SQL for this query. Returns the SQL string and list of parameters. This is overridden from the original Query clas...
mit
tillahoffmann/tensorflow
tensorflow/python/summary/writer/event_file_writer.py
104
5848
# 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
markliederbach/blog-backend
blog_backend/users/admin.py
41
1155
from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as AuthUserAdmin from django.contrib.auth.forms import UserChangeForm, UserCreationForm from .models import User class MyUserChangeForm(UserChangeForm): class Meta(UserChangeForm.Meta): model = User ...
mit
gstarnberger/paasta
paasta_tools/setup_marathon_job.py
1
28329
#!/usr/bin/env python # Copyright 2015-2016 Yelp 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 ...
apache-2.0
fw1121/ete
ez_setup.py
202
10285
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
gpl-3.0
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py
1
9537
# Copyright 2016 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. """A command to fetch new baselines from try jobs for a Rietveld issue. This command interacts with the Rietveld API to get information about try jobs with ...
gpl-3.0
andim/scipy
scipy/weave/tests/test_catalog.py
91
18251
from __future__ import absolute_import, print_function import sys import os import re import glob import string import stat import tempfile from distutils.dir_util import remove_tree from numpy.testing import TestCase, assert_, run_module_suite from numpy.testing.noseclasses import KnownFailureTest from scipy.weave...
bsd-3-clause
earies/exabgp
lib/exabgp/configuration/operational/parser.py
4
3077
# encoding: utf-8 """ parse_operational.py Created by Thomas Mangin on 2015-06-23. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from exabgp.util.ip import isipv4 from exabgp.protocol.family import AFI from exabgp.protocol.family import SAFI from exabgp.bgp.message.open.routerid import RouterID fro...
bsd-3-clause
AnanyaKumar/kubernetes
cluster/juju/charms/trusty/kubernetes-master/hooks/hooks.py
202
8337
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
BeckResearchLab/USP-inhibition
tests/test_models.py
9
3129
import unittest import bacteriopop_utils import load_data import numpy as np import pandas as pd import pandas as pd import requests print "hello!" class TestUrlsExist(unittest.TestCase): def test_raw_data_link(self): """ Test for existence of raw_data.csv link in load_data module. """ ...
bsd-3-clause
nerzhul/ansible
lib/ansible/modules/web_infrastructure/supervisorctl.py
29
9130
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Matt Wright <matt@nobien.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 version 3 of the License...
gpl-3.0
cntnboys/410Lab6
v1/lib/python2.7/site-packages/django/db/models/query.py
48
77464
""" The main QuerySet implementation. This provides the public API for the ORM. """ from collections import deque import copy import sys from django.conf import settings from django.core import exceptions from django.db import connections, router, transaction, IntegrityError from django.db.models.constants import LOO...
apache-2.0
Azure/azure-sdk-for-python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/models/__init__.py
1
2849
# 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 may ...
mit
marcosmodesto/django-testapp
django/django/core/management/commands/diffsettings.py
411
1296
from django.core.management.base import NoArgsCommand def module_to_dict(module, omittable=lambda k: k.startswith('_')): "Converts a module namespace to a Python dictionary. Used by get_settings_diff." return dict([(k, repr(v)) for k, v in module.__dict__.items() if not omittable(k)]) class Command(NoArgsComm...
bsd-3-clause
Nitaco/ansible
test/units/plugins/strategy/test_strategy_linear.py
18
6614
# Copyright (c) 2018 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 from ansible.compat.tests import unittest from ansible.compat.tests....
gpl-3.0
bcorbet/SickRage
sickbeard/dailysearcher.py
1
3750
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
gpl-3.0
pombredanne/ftpext
setup.py
1
1076
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() setup( name='ftpext', ...
bsd-3-clause
zhwcoder/pyspider
pyspider/webui/login.py
40
1531
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<roy@binux.me> # http://binux.me # Created on 2014-12-10 20:36:27 import base64 from flask import Response from flask.ext import login from .app import app login_manager = login.LoginManager() login...
apache-2.0
karthik339/Agni
MainDemo/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py
2930
11275
######################## 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...
apache-2.0
aestrivex/mne-python
mne/channels/interpolation.py
9
6977
# Authors: Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import numpy as np from numpy.polynomial.legendre import legval from scipy import linalg from ..utils import logger from ..io.pick import pick_types, pick_channels from ..surface import _normalize_vectors from ..bem import _fit_sphere fr...
bsd-3-clause
laincloud/lain
playbooks/roles/libraries/library/inspect_docker_network.py
4
2720
#!/usr/bin/env python from subprocess import Popen, PIPE import json from ansible.module_utils.basic import * module = AnsibleModule( argument_spec=dict( node=dict(required=True), app=dict(required=True), proc=dict(required=True), instance_number=dict(required=True), client...
mit
awohns/selection
python_lib/lib/python3.4/site-packages/setuptools/command/install_egg_info.py
357
3833
from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util import os, shutil, pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_...
mit
google/fedjax
fedjax/legacy/algorithms/mime_test.py
1
2075
# Copyright 2020 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 agreed to in writing, ...
apache-2.0
crscardellino/thesis
thesis/parsers/freeling.py
1
3854
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os import sys from subprocess import PIPE, Popen if sys.version_info.major == 2: from distutils.spawn import find_executable as which else: from shutil import which _INPUT_FORMATS = {'text', 'freeling',...
mit
h4ck3rm1k3/orca-sonar
test/keystrokes/oobase/bug_463172.py
4
4082
#!/usr/bin/python """Test to verify bug #463172 is still fixed. OOo sbase application crashes when entering a database record. """ from macaroon.playback import * sequence = MacroSequence() ###################################################################### # 1. Start oobase. Wait for the first screen of the ...
lgpl-2.1
danieljaouen/ansible
lib/ansible/modules/cloud/cloudstack/cs_vpc.py
28
11320
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016, René Moser <mail@renemoser.net> # 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
davidvon/pipa-pay-server
site-packages/sqlcmd/ecmd.py
20
5712
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # # $Id: 4924bbb91e59566666746c62bd76c59e178b4b6a $ """ Configuration classes for *sqlcmd*. COPYRIGHT AND LICENSE Copyright © 2008 Brian M. Clapper This is free software, released under the following BSD-like license: Redistribution and use in source and binary fo...
apache-2.0