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
pombredanne/puke-1
puke/Tools.py
2
13617
#!/usr/bin/env python # -*- coding: utf8 -*- import os, os.path, shutil, logging, sys, filecmp, stat, re, time from puke.FileList import * from puke.Console import * from scss import Scss from puke.FileSystem import * from puke.Compress import * from puke.Std import * from puke.ToolsExec import * from puke.Cache ...
mit
Frenzie/youtube-dl
youtube_dl/extractor/godtube.py
177
1785
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, ) class GodTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?godtube\.com/watch/\?v=(?P<id>[\da-zA-Z]+)' _TESTS = [ { 'url': 'https://ww...
unlicense
en0/Supybot_sasl
plugins/Dunno/test.py
21
3402
### # Copyright (c) 2003-2005, Daniel DiPaolo # 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 cond...
bsd-3-clause
kwlzn/pants
tests/python/pants_test/scm/test_git.py
1
22315
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sub...
apache-2.0
mtesseracttech/CustomEngine
lib/bullet/src/examples/pybullet/vr_kuka_setup.py
1
4440
import pybullet as p p.connect(p.SHARED_MEMORY) p.resetSimulation() objects = [p.loadURDF("plane.urdf", 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000)] objects = [p.loadURDF("samurai.urdf", 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000)] objects = [p.loadURDF("pr2_gripper.urdf", 0.500...
apache-2.0
elkingtonmcb/django
django/core/handlers/wsgi.py
339
9181
from __future__ import unicode_literals import cgi import codecs import logging import sys from io import BytesIO from threading import Lock from django import http from django.conf import settings from django.core import signals from django.core.handlers import base from django.core.urlresolvers import set_script_pr...
bsd-3-clause
jjmiranda/edx-platform
common/djangoapps/geoinfo/middleware.py
194
1421
""" Middleware to identify the country of origin of page requests. Middleware adds `country_code` in session. Usage: # To enable the Geoinfo feature on a per-view basis, use: decorator `django.utils.decorators.decorator_from_middleware(middleware_class)` """ import logging import pygeoip from ipware.ip import get...
agpl-3.0
elenaoat/AutobahnPython
examples/websocket/multiproto/server2.py
19
2348
############################################################################### ## ## Copyright 2013 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 ## ## http://www...
apache-2.0
RO-ny9/python-for-android
python-modules/twisted/twisted/conch/error.py
60
2677
# Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ An error to represent bad things happening in Conch. Maintainer: Paul Swartz """ from twisted.cred.error import UnauthorizedLogin class ConchError(Exception): def __init__(self, value, data = None): Exception.__init_...
apache-2.0
jsvelasquezv/agroind-mobile
platforms/browser/www/node_modules/node-ninja/gyp/PRESUBMIT.py
1369
3662
# 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. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
apache-2.0
mikalstill/nova
nova/scheduler/filters/type_filter.py
5
1509
# Copyright (c) 2012 The Cloudscaling Group, 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 # # ...
apache-2.0
tum-pbs/PhiFlow
phi/math/_nd.py
1
21446
# Because division is different in Python 2 and 3 from __future__ import division from typing import Tuple import numpy as np from . import _ops as math from . import extrapolation as extrapolation from ._config import GLOBAL_AXIS_ORDER from ._ops import stack from ._shape import Shape, channel, batch, spatial from ...
mit
lamblin/pylearn2
pylearn2/sandbox/cuda_convnet/tests/profile_probabilistic_max_pooling.py
44
2414
from __future__ import print_function import theano.tensor as T import numpy as np from theano.compat.six.moves import xrange from theano import config from theano import function import time from pylearn2.utils import sharedX from pylearn2.sandbox.cuda_convnet.probabilistic_max_pooling import \ prob_max_pool...
bsd-3-clause
RoboErik/RUBIK
Rubik/RubikSolver/SDL_BM017CS/SDL_PC_BM017CS.py
1
4650
#!/usr/bin/python import time import smbus from Adafruit_I2C import Adafruit_I2C # =========================================================================== # SDL_BM017 / TCS34725 color sensor i2c driver Class # SwitchDoc Labs / Project Curacao # originally from Project Curacao # Version 1.1 # 2/14/14 # # ========...
apache-2.0
criteo-forks/graphite-web
webapp/tests/test_dashboard.py
4
22800
import copy import errno import mock import os from . import TEST_CONF_DIR from django.conf import settings try: from django.urls import reverse except ImportError: # Django < 1.10 from django.core.urlresolvers import reverse from django.http import HttpResponse from .base import TestCase from django.test.ut...
apache-2.0
yeyanchao/calibre
src/calibre/gui2/catalog/catalog_tab_template_ui.py
1
1116
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/yc/code/calibre/calibre/src/calibre/gui2/catalog/catalog_tab_template.ui' # # Created: Thu Oct 25 16:54:55 2012 # by: PyQt4 UI code generator 4.8.5 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore...
gpl-3.0
xbezdick/tempest
tempest/api/network/base_security_groups.py
17
2072
# Copyright 2013 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
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/pymaging/pymaging/exceptions.py
1
1691
# -*- coding: utf-8 -*- # Copyright (c) 2012, Jonas Obrist # 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...
bsd-3-clause
joeghodsi/interview-questions
cracking-the-coding-interview/ch8-object-oriented-design/8.2-call-center.py
1
3065
''' Problem: design and implement a call center which has 3 types of employees: respondents, managers, directors. A call is answered by the first available respondent. If the respondent can't handle the call, they must escalate to a manager. If the manager can't handle it or is not free, they must escalate ...
unlicense
ZobairAlijan/osf.io
framework/auth/__init__.py
5
2204
# -*- coding: utf-8 -*- from datetime import datetime from framework.sessions import session, create_session, Session from modularodm import Q from framework import bcrypt from framework.auth import signals from framework.auth.exceptions import DuplicateEmailError from .core import User, Auth from .core import get_u...
apache-2.0
iambibhas/django
django/test/client.py
9
26065
from __future__ import unicode_literals import sys import os import re import mimetypes from copy import copy from importlib import import_module from io import BytesIO from django.apps import apps from django.conf import settings from django.core import urlresolvers from django.core.handlers.base import BaseHandler ...
bsd-3-clause
daemonmaker/pylearn2
pylearn2/expr/stochastic_pool.py
44
6909
""" An implementation of stochastic max-pooling, based on Stochastic Pooling for Regularization of Deep Convolutional Neural Networks Matthew D. Zeiler, Rob Fergus, ICLR 2013 """ __authors__ = "Mehdi Mirza" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Mehdi Mirza", "Ian Goodfellow"] _...
bsd-3-clause
KMUX-Project/KMUX
kmux/modules/root/action/root.py
1
3287
#!/usr/bin/python3 ''' KMUX - a free and open source small business server. Copyright (C) 2015, Julian Thomé <julian.thome.de@gmail.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...
gpl-2.0
foglamp/FogLAMP
python/foglamp/services/core/api/service.py
1
23354
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import asyncio import os import datetime import uuid import platform import json from aiohttp import web from typing import Dict, List from foglamp.common import utils from foglamp.common import logger from foglamp.common.serv...
apache-2.0
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/cupshelpers/__init__.py
4
1813
## system-config-printer ## Copyright (C) 2008, 2011 Red Hat, Inc. ## Authors: ## Tim Waugh <twaugh@redhat.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 Lice...
gpl-3.0
Nitaco/ansible
lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py
8
21997
#!/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
ilexius/odoo
addons/account_test/report/account_test_report.py
18
2791
# -*- coding: utf-8 -*- import datetime from openerp import api, models, _ from openerp.tools.safe_eval import safe_eval as eval # # Use period and Journal for selection or resources # class ReportAssertAccount(models.AbstractModel): _name = 'report.account_test.report_accounttest' @api.model def execute...
gpl-3.0
RuthAngus/LSST-max
code/clusters.py
1
7180
# coding: utf-8 # # Recovering rotation periods in simulated LSST data from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from gatspy.periodic import LombScargle from toy_simulator import simulate_LSST import simple_gyro as sg import pandas as pd import sys def find_nearest(arra...
mit
blockstack/blockstack-server
integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_delays.py
1
6755
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Blockstack ~~~~~ copyright: (c) 2014-2015 by Halfmoon Labs, Inc. copyright: (c) 2016 by Blockstack.org This file is part of Blockstack Blockstack is free software: you can redistribute it and/or modify it under the terms of the GNU General...
gpl-3.0
michelts/lettuce
tests/integration/lib/Django-1.3/django/core/mail/backends/smtp.py
202
3878
"""SMTP email backend class.""" import smtplib import socket import threading from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.utils import DNS_NAME from django.core.mail.message import sanitize_address class EmailBackend(BaseEmailBackend): """ ...
gpl-3.0
xin3liang/platform_prebuilts_gcc_darwin-x86_arm_arm-linux-androideabi-4.9
share/gdb/python/gdb/command/type_printers.py
137
4424
# Type printer commands. # Copyright (C) 2010-2013 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
matsprea/omim
3party/protobuf/python/google/protobuf/internal/cpp_message.py
80
23543
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
apache-2.0
bgris/ODL_bgris
lib/python3.5/site-packages/scipy/optimize/_numdiff.py
51
21209
"""Routines for numerical differentiation.""" from __future__ import division import numpy as np from ..sparse import issparse, csc_matrix, csr_matrix, coo_matrix, find from ._group_columns import group_dense, group_sparse EPS = np.finfo(np.float64).eps def _adjust_scheme_to_bounds(x0, h, num_steps, scheme, lb, u...
gpl-3.0
debsankha/networkx
examples/algorithms/blockmodel.py
32
3009
#!/usr/bin/env python # encoding: utf-8 """ Example of creating a block model using the blockmodel function in NX. Data used is the Hartford, CT drug users network: @article{, title = {Social Networks of Drug Users in {High-Risk} Sites: Finding the Connections}, volume = {6}, shorttitle = {Social Networks of Drug ...
bsd-3-clause
nasfarley88/tomato-timer-tg-bot
tomatotimertgbot/__init__.py
1
7810
#!/usr/bin/env python3 import asyncio import telepot import yaml import datetime import random import math import dataset from . import help, task def format_seconds_as_mm_ss(seconds): return "{}:{:02}".format( math.floor(seconds/60.0), math.floor(seconds) % 60) class Tomato(telepot.helper.ChatHandler):...
cc0-1.0
ztane/tet
tet/config/__init__.py
2
8526
from typing import Callable, Any import sys from collections import ChainMap from collections.abc import Mapping from functools import wraps from pyramid.config import * from pyramid.config import Configurator from tet.decorators import deprecated from tet.i18n import configure_i18n from tet.util.collections import ...
bsd-3-clause
Samuel789/MediPi
MedManagementWeb/env/lib/python3.5/site-packages/Crypto/SelfTest/Cipher/test_OCB.py
4
25001
# =================================================================== # # Copyright (c) 2014, Legrandin <helderijs@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributio...
apache-2.0
tsdmgz/ansible
lib/ansible/modules/network/avi/avi_useraccountprofile.py
27
4667
#!/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
qinjian623/emacs-config
.python-environments/default/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/euctwfreq.py
3133
34872
######################## 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...
gpl-3.0
kennethlove/django
django/contrib/gis/geoip/tests.py
6
4706
from __future__ import unicode_literals import os from django.conf import settings from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.geoip import GeoIP, GeoIPException from django.utils import unittest # Note: Requires use of both the GeoIP country and city datasets. # The GEOIP_DATA path shoul...
bsd-3-clause
levilucio/SyVOLT
t_core/Mutex/HTakeRulePivotRHS.py
1
7540
from core.himesis import Himesis, HimesisPostConditionPattern import cPickle as pickle class HTakeRulePivotRHS(HimesisPostConditionPattern): def __init__(self): """ Creates the himesis graph representing the AToM3 model HTakeRulePivotRHS. """ # Create the himesis graph ...
mit
usakhelo/FreeCAD
src/Mod/OpenSCAD/OpenSCADCommands.py
2
20612
#*************************************************************************** #* * #* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> * #* * #* This pr...
lgpl-2.1
LTMana/code
Python/Django/homework/backend/firstapp/migrations/0001_initial.py
1
1554
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-05 04:53 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
mit
acshan/odoo
addons/mrp/__init__.py
437
1165
# -*- 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
jolyonb/edx-platform
lms/djangoapps/grades/tests/base.py
5
4430
""" Base file for Grades tests """ from crum import set_current_request from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.course_blocks.api import get_course_blocks from openedx.core.djangolib.testing.utils import get_mock_request from student.models import CourseEnrollme...
agpl-3.0
techaddict/spark
python/run-tests.py
7
13052
#!/usr/bin/env python # # 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 "Li...
apache-2.0
MackZxh/OCA-Choice
knowledge/attachment_preview/model/ir_attachment.py
9
2843
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2014 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
lgpl-3.0
AOSPU/external_chromium_org
build/linux/install-arm-sysroot.py
15
2718
#!/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. """Script to install ARM root image for cross building of ARM chrome on linux. This script can be run manually but is more often ru...
bsd-3-clause
ltucker/melkman
tests/helpers.py
1
6931
from melkman.green import green_init green_init() from datetime import datetime, timedelta from eventlet.green import socket from eventlet.support.greenlets import GreenletExit from eventlet.wsgi import server as wsgi_server import os import time from urlparse import urlsplit from urllib import quote_plus from webob i...
gpl-2.0
joopert/home-assistant
tests/components/zwave/test_light.py
4
15115
"""Test Z-Wave lights.""" from unittest.mock import patch, MagicMock from homeassistant.components import zwave from homeassistant.components.zwave import const, light from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_TRANSITION, SUPPORT_BRIGHTNESS, ...
apache-2.0
facebook/mysql-5.6
xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/bug810269_test.py
24
6930
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
gpl-2.0
VarchukVladimir/gizer
gizer/opinsert.py
2
3720
#!/usr/bin/env python """ Handler of timestamps which operation type is insert op=insert """ __author__ = "Yaroslav Litvinov" __copyright__ = "Copyright 2016, Rackspace Inc." __email__ = "yaroslav.litvinov@rackspace.com" ENCODE_ESCAPE = 1 ENCODE_ONLY = 0 NO_ENCODE_NO_ESCAPE = None def format_string_insert_query(tab...
apache-2.0
borisroman/vdsm
lib/vdsm/exception.py
3
1193
# # Copyright 2012 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed in th...
gpl-2.0
antonio-fr/bitcoin
qa/rpc-tests/walletbackup.py
132
7263
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send tran...
mit
Qalthos/ansible
lib/ansible/modules/monitoring/bigpanda.py
92
5714
#!/usr/bin/python # -*- coding: utf-8 -*- # 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', ...
gpl-3.0
rdobson/python-hwinfo
hwinfo/host/cpuinfo.py
1
1269
"""Module for parsing the output of /proc/cpuinfo""" from hwinfo.util import CommandParser REGEX_TEMPLATE = r'%s([\ \t])+\:\ (?P<%s>.*)' class CPUInfoParser(CommandParser): ITEM_SEPERATOR = "\n\n" ITEM_REGEXS = [ REGEX_TEMPLATE % ('processor', 'processor'), REGEX_TEMPLATE % ('vendor_id', 'v...
lgpl-2.1
bigmlcom/bigmler
bigmler/tests/test_03_unicode_command.py
1
3461
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2015-2021 BigML # # 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 requi...
apache-2.0
shaistaansari/django
tests/gis_tests/layermap/models.py
67
2507
from django.utils.encoding import python_2_unicode_compatible from ..models import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=25) objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] ...
bsd-3-clause
saifrahmed/bokeh
bokeh/models/axes.py
33
5946
""" Guide renderers for various kinds of axes that can be added to Bokeh plots """ from __future__ import absolute_import from ..properties import Int, Float, String, Enum, Bool, Datetime, Auto, Instance, Tuple, Either, Include from ..mixins import LineProps, TextProps from ..enums import Location from .renderers im...
bsd-3-clause
open-craft/xblock-dalite
dalite_xblock/utils.py
1
1894
# -*- coding: utf-8 -*- """Dalite XBlock utils.""" from lazy.lazy import lazy def _(text): # pylint: disable=invalid-name """ Make '_' a no-op so we can scrape strings. :return text """ return text # pylint: disable=protected-access class FieldValuesContextManager(object): """ Allow u...
agpl-3.0
Eric89GXL/scipy
scipy/optimize/_trustregion_constr/equality_constrained_sqp.py
10
8676
"""Byrd-Omojokun Trust-Region SQP method.""" from __future__ import division, print_function, absolute_import from scipy.sparse import eye as speye from .projections import projections from .qp_subproblem import modified_dogleg, projected_cg, box_intersections import numpy as np from numpy.linalg import norm __all__ ...
bsd-3-clause
falbassini/Samples
python/v2.2/create_floodlight_activity_group.py
3
2300
#!/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
jordiblasco/easybuild-easyblocks
easybuild/easyblocks/generic/__init__.py
24
1376
## # Copyright 2009-2015 Ghent University # Copyright 2009-2015 Stijn De Weirdt # Copyright 2010 Dries Verdegem # Copyright 2010-2015 Kenneth Hoste # Copyright 2011 Pieter De Baets # Copyright 2011-2015 Jens Timmerman # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://u...
gpl-2.0
Nitaco/ansible
lib/ansible/modules/network/f5/bigip_gtm_pool.py
6
37181
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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', ...
gpl-3.0
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/tools/anonymize.py
1
2444
''' Task Coach - Your friendly task manager Copyright (C) 2011 Task Coach developers <developers@taskcoach.org> Task Coach 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 y...
gpl-3.0
twalthr/flink
flink-python/pyflink/common/typeinfo.py
6
36879
################################################################################ # 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
zverevalexei/trex-http-proxy
trex_client/external_libs/scapy-2.3.1/python2/scapy/layers/ipsec.py
9
35424
############################################################################# ## ipsec.py --- IPSec support for Scapy ## ## ## ## Copyright (C) 2014 6WIND ## ## ...
mit
b-jesch/service.fritzbox.callmonitor
resources/lib/PhoneBooks/pyicloud/vendorlibs/requests/packages/urllib3/util/ssl_.py
152
11624
from __future__ import absolute_import import errno import warnings import hmac from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning SSLContext = None HAS_SNI = False create_default_context = None IS_PYOPENSSL = F...
gpl-2.0
mraspaud/mpop
mpop/satin/fy3_virr.py
2
6378
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015, 2016 Adam.Dybbroe # Author(s): # Adam.Dybbroe <adam.dybbroe@smhi.se> # Katerina.Melnik <kmelnik@scanex.ru> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
gpl-3.0
bitmovin/bitmovin-python
bitmovin/resources/models/encodings/inputstreams/h264_picture_timing_trimming_input_stream.py
1
1556
from .abstract_trimming_input_stream import AbstractTrimmingInputStream class H264PictureTimingTrimmingInputStream(AbstractTrimmingInputStream): def __init__(self, input_stream_id, start_pic_timing=None, end_pic_timing=None, id_=None, custom_data=None, name=None, description=None): super...
unlicense
HewlettPackard/oneview-redfish-toolkit
oneview_redfish_toolkit/tests/api/test_ethernet_interface.py
1
2896
# -*- coding: utf-8 -*- # Copyright (2018) Hewlett Packard Enterprise Development LP # # 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...
apache-2.0
jernsthausen/datesplitter
lib/python2.7/site-packages/pip/_vendor/progress/bar.py
404
2707
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software 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 P...
mit
pilliq/mongo-web-shell
webapps/server/crontab.py
5
1707
# Copyright 2013 10gen 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...
apache-2.0
pawelmhm/AutobahnPython
examples/twisted/websocket/echo_variants/client_with_params.py
18
1921
############################################################################### ## ## Copyright (C) 2011-2013 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 ## ## h...
apache-2.0
skbly7/serc
website/wiki/plugins/images/settings.py
16
1323
from __future__ import absolute_import from __future__ import unicode_literals from django import VERSION from django.conf import settings as django_settings from wiki.conf import settings as wiki_settings SLUG = 'images' # This is deprecated in django 1.7+ APP_LABEL = 'images' if VERSION < (1, 7) else None # Where ...
mit
throwable-one/lettuce
tests/integration/lib/Django-1.2.5/django/core/cache/backends/locmem.py
46
4062
"Thread-safe in-memory cache backend." import time try: import cPickle as pickle except ImportError: import pickle from django.core.cache.backends.base import BaseCache from django.utils.synch import RWLock class CacheClass(BaseCache): def __init__(self, _, params): BaseCache.__init__(self, param...
gpl-3.0
raulanatol/awsebcli
botocore_eb/vendored/requests/models.py
14
23710
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import...
apache-2.0
r0balo/pelisalacarta
python/main-classic/channels/gaypornshare.py
5
5897
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para gaypornshare.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import os import re from core import config from core ...
gpl-3.0
tlakshman26/cinder-new-branch
cinder/api/views/scheduler_stats.py
33
1719
# Copyright (C) 2014 eBay 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...
apache-2.0
sshnaidm/ru
script.video.F4mProxy/lib/flvlib/scripts/index_flv.py
98
13650
import os import sys import shutil import logging import tempfile from optparse import OptionParser from flvlib import __versionstr__ from flvlib.constants import TAG_TYPE_AUDIO, TAG_TYPE_VIDEO, TAG_TYPE_SCRIPT from flvlib.constants import FRAME_TYPE_KEYFRAME from flvlib.astypes import MalformedFLV, FLVObject from fl...
gpl-2.0
yarikoptic/pystatsmodels
statsmodels/datasets/randhie/data.py
3
2604
"""RAND Health Insurance Experiment Data""" __docformat__ = 'restructuredtext' COPYRIGHT = """This is in the public domain.""" TITLE = __doc__ SOURCE = """ The data was collected by the RAND corporation as part of the Health Insurance Experiment (HIE). http://www.rand.org/health/projects/hie/ This data...
bsd-3-clause
mstriemer/app-validator
tests/js/test_features.py
1
3970
from functools import wraps from nose.tools import eq_ from js_helper import TestCase def uses_feature(name): def wrap(func): @wraps(func) def inner(self, *args, **kw): func(self, *args, **kw) self.assert_has_feature(name) return inner return wrap class Feat...
bsd-3-clause
MCMic/Sick-Beard
lib/imdb/parser/http/characterParser.py
143
8139
""" parser.http.characterParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a character. E.g., for "Jesse James" the referred pages would be: main details: http://www.imdb.com/character/ch0000001/ biography: ...
gpl-3.0
mvaled/OpenUpgrade
addons/website_event_sale/controllers/main.py
233
3374
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-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
EdgarSun/Django-Demo
django/contrib/auth/tests/forms.py
97
9436
from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, AuthenticationForm, PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm from django.db import connection from django.test import TestCase from django.utils import unittest class UserCreationFormTest...
mit
flgiordano/netcash
+/google-cloud-sdk/lib/surface/components/list.py
1
3566
# Copyright 2013 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
marcoserafini/h-store
third_party/cpp/protobuf/python/ez_setup.py
55
9816
#!python # This file was obtained from: # http://peak.telecommunity.com/dist/ez_setup.py # on 2009/4/17. """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...
gpl-3.0
isandlaTech/cohorte-3rdparty
sleekxmpp/src/main/python/sleekxmpp/plugins/xep_0071/stanza.py
11
2862
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2012 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.stanza import Message from sleekxmpp.util import unicode from sleekxmpp.thirdparty import OrderedDict from sleekxmpp.xmlstream im...
apache-2.0
gnowledge/OTM2
opentreemap/treemap/migrations/0082_rename_species_fields.py
3
23085
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.rename_column(u'treemap_species', 'other', 'other_part_of_name') db.rename_column(u'treemap_species', 'na...
gpl-3.0
tomchristie/django
tests/postgres_tests/test_indexes.py
25
10150
from django.contrib.postgres.indexes import BrinIndex, GinIndex, GistIndex from django.db import connection from django.test import skipUnlessDBFeature from . import PostgreSQLTestCase from .models import CharFieldModel, DateTimeArrayModel, IntegerArrayModel @skipUnlessDBFeature('has_brin_index_support') class BrinI...
bsd-3-clause
cntnboys/410Lab6
v1/lib/python2.7/site-packages/django/template/defaulttags.py
49
50815
"""Default tags used by the template system, available to all templates.""" from __future__ import unicode_literals import os import sys import re from datetime import datetime from itertools import groupby, cycle as itertools_cycle import warnings from django.conf import settings from django.template.base import (No...
apache-2.0
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/PyAMF-0.7.2/pyamf/tests/remoting/test_remoteobject.py
6
8543
# -*- coding: utf-8 -*- # # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ RemoteObject Tests. @since: 0.1 """ import unittest import pyamf from pyamf import remoting from pyamf.remoting import amf3, gateway from pyamf.flex import messaging class RandomIdGeneratorTestCase(unittest.TestCase): ...
mit
aboutsajjad/Bridge
app_packages/youtube_dl/extractor/bleacherreport.py
39
4164
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .amp import AMPIE from ..utils import ( ExtractorError, int_or_none, parse_iso8601, ) class BleacherReportIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bleacherreport\.com/articles/(?P<id>\d+)' _...
mit
sheltowt/PIXLEE-computer-vision-clustering
PCV/tools/imregistration.py
21
3547
from PIL import Image from xml.dom import minidom from numpy import * from pylab import * from scipy import ndimage, linalg from scipy.misc import imsave import os def read_points_from_xml(xmlFileName): """ Reads control points for face alignment. """ xmldoc = minidom.parse(xmlFileName) facelist = xmldoc...
bsd-2-clause
shepdelacreme/ansible
lib/ansible/modules/network/f5/bigip_snmp.py
8
13167
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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', ...
gpl-3.0
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/test/test_random.py
36
22281
#!/usr/bin/env python import unittest import random import time import pickle import warnings from math import log, exp, pi, fsum, sin from functools import reduce from test import test_support class TestBasicOps(unittest.TestCase): # Superclass with tests common to all generators. # Subclasses must arrange f...
gpl-3.0
MrSenko/Nitrate
tcms/core/contrib/auth/views.py
1
4087
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import auth from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import redirect, render_to_response from django.template import RequestContext from django.views.decorators.http import requir...
gpl-2.0
IV-GII/Django_Traduccion
allauth/socialaccount/providers/angellist/views.py
80
1056
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import AngelListProvider class AngelListOAuth2Adapter(OAuth2...
gpl-3.0
agdsn/sipa
sipa/utils/graph_utils.py
2
3274
# -*- coding: utf-8 -*- from typing import List import pygal from flask_babel import gettext from pygal import Graph from pygal.colors import hsl_to_rgb from pygal.style import Style from sipa.units import (format_as_traffic, max_divisions, reduce_by_base) from sipa.utils.babel_utils import ge...
mit
nuuuboo/odoo
openerp/addons/base/tests/test_mail_examples.py
302
57129
#!/usr/bin/env python # -*- coding: utf-8 -*- MISC_HTML_SOURCE = """ <font size="2" style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; ">test1</font> <div style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; font-size: 12px; fo...
agpl-3.0