repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
Slezhuk/ansible
lib/ansible/modules/notification/pushover.py
36
3667
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2012, Jim Richardson <weaselkeeper@gmail.com> # All rights reserved. # # 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 F...
gpl-3.0
jeffzheng1/tensorflow
tensorflow/python/ops/clip_ops.py
17
10072
# 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
openplans/shareabouts-api
src/sa_api_v2/cors/south_migrations/0004__rename_originpermission_to_origin.py
1
5202
# -*- 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): # Deleting model 'OriginPermission' db.rename_table('cors_originpermission', 'cors_origin') db.renam...
gpl-3.0
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/third_party/cython/src/Cython/Compiler/Naming.py
93
5553
# # C naming conventions # # # Prefixes for generating C names. # Collected here to facilitate ensuring uniqueness. # pyrex_prefix = "__pyx_" codewriter_temp_prefix = pyrex_prefix + "t_" temp_prefix = u"__cyt_" builtin_prefix = pyrex_prefix + "builtin_" arg_prefix = pyrex_prefix + "arg_" f...
mit
buckett/sakai-gitflow
reference/library/src/webapp/editor/FCKeditor/editor/filemanager/connectors/py/fckoutput.py
131
4042
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
apache-2.0
aerickson/ansible
lib/ansible/modules/cloud/openstack/os_network.py
27
8686
#!/usr/bin/python # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 vers...
gpl-3.0
adishjain/youtube-dl
youtube_dl/extractor/parliamentliveuk.py
179
1781
from __future__ import unicode_literals import re from .common import InfoExtractor class ParliamentLiveUKIE(InfoExtractor): IE_NAME = 'parliamentlive.tv' IE_DESC = 'UK parliament videos' _VALID_URL = r'https?://www\.parliamentlive\.tv/Main/Player\.aspx\?(?:[^&]+&)*?meetingId=(?P<id>[0-9]+)' _TEST ...
unlicense
eckucukoglu/arm-linux-gnueabihf
arm-linux-gnueabihf/libc/usr/lib/python2.7/lib2to3/fixes/fix_operator.py
326
3472
"""Fixer for operator functions. operator.isCallable(obj) -> hasattr(obj, '__call__') operator.sequenceIncludes(obj) -> operator.contains(obj) operator.isSequenceType(obj) -> isinstance(obj, collections.Sequence) operator.isMappingType(obj) -> isinstance(obj, collections.Mapping) operator.isNumberType(obj) ...
gpl-2.0
openstack/swift
test/unit/common/ring/test_builder.py
1
197289
# Copyright (c) 2010-2012 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 agree...
apache-2.0
komsas/OpenUpgrade
addons/sale_crm/__init__.py
353
1076
# -*- 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
mattvick/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/filenamepattern_unittest.py
124
2557
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
tudorvio/nova
nova/api/openstack/compute/plugins/v3/deferred_delete.py
36
2841
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
JASON0916/testrail-library
testrail_client/api/plan.py
1
6164
#!/usr/bin/env python # -*- coding: utf-8 -*- from base import TestRailAPIBase class Plan(TestRailAPIBase): """ Use the following API methods to request details ...
mit
iut-ibk/DynaMind-UrbanSim
3rdparty/opus/src/urbansim/configs/dplcm_zone_estimation_config.py
2
1198
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from dplcm_estimation_config import dplcm_configuration as dplcm_gridcell_config from estimation_zone_config import run_configuration as config class dplcm_configuration(dplcm_gridcell_config):...
gpl-2.0
transt/cloud-init-0.7.5
cloudinit/distros/parsers/hosts.py
8
3241
# vi: ts=4 expandtab # # Copyright (C) 2012 Yahoo! Inc. # # Author: Joshua Harlow <harlowja@yahoo-inc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # published by the Free Software Foundation. # # This...
gpl-3.0
mrunge/horizon
openstack_dashboard/dashboards/project/data_processing/jobs/workflows/launch.py
14
16820
# 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
apiaryio/snowcrash
tools/gyp/pylib/gyp/xcode_emulation.py
3
66631
# 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
mit
ewindisch/nova
nova/tests/api/openstack/compute/plugins/v3/test_user_data.py
17
8671
# Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp. # 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/LIC...
apache-2.0
imsparsh/python-for-android
python-build/python-libs/gdata/build/lib/gdata/docs/service.py
133
22521
#!/usr/bin/python # # Copyright 2009 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
thisisshi/cloud-custodian
tools/c7n_gcp/c7n_gcp/output.py
2
6276
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 """ TODO: provider policy execution initialization for outputs """ import datetime import logging import time try: from google.cloud.storage import Bucket, Client as StorageClient except ImportError: Bucket, StorageClient = None,...
apache-2.0
tomspur/shedskin
shedskin/lib/socket.py
6
2243
# Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE) # model for module socket for shed skin # from python 2.5.1 documentation SHUT_RD=0 SHUT_WR=1 SHUT_RDWR=2 SOL_IP=0 SOL_SOCKET=1 SO_REUSEADDR=2 AI_PASSIVE=1 AF_UNIX=1 AF_INET=2 AF_INET6=10 IP_TOS=1 SOCK_STREAM=1 SOCK_DGRAM=2 SOMAXCO...
gpl-3.0
sbesson/openmicroscopy
components/tools/OmeroWeb/test/integration/test_thumbnails.py
2
7336
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2016 University of Dundee & Open Microscopy Environment. # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Founda...
gpl-2.0
hubertokf/lupsEdgeServer
projects/lupsEdgeServer/EngineRules/setuptools-20.10.1/setuptools/site-patch.py
720
2389
def __boot(): import sys import os PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] else: PYTHONPATH = PYTHONPATH.split(os.pathsep) pic = getattr(sys,'path_importer_cache',{}) stdpath = sys.path[le...
mit
KublaikhanGeek/scrapy
scrapy/xlib/tx/endpoints.py
164
41184
# -*- test-case-name: twisted.internet.test.test_endpoints -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementations of L{IStreamServerEndpoint} and L{IStreamClientEndpoint} that wrap the L{IReactorTCP}, L{IReactorSSL}, and L{IReactorUNIX} interfaces. This also implements an exte...
bsd-3-clause
j717273419/ibus
ibus/common.py
6
6133
# vim:set et sts=4 sw=4: # # ibus - The Input Bus # # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com> # Copyright (c) 2007-2010 Red Hat, Inc. # # 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 Sof...
lgpl-2.1
SanchayanMaity/gem5
src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py
91
3586
# 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
lukeiwanski/tensorflow
tensorflow/contrib/ffmpeg/decode_video_op_test.py
31
2478
# 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
rbrito/pkg-youtube-dl
youtube_dl/extractor/ceskatelevize.py
12
10657
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, sanitized_Request, unescapeHTML, update_url_query, ...
unlicense
lsigithub/axxia_yocto_linux_4.1
scripts/gdb/linux/symbols.py
367
6324
# # gdb helper commands and functions for Linux kernel debugging # # load kernel and module symbols # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import os import re import string from linux...
gpl-2.0
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGLContext/shadow/volume.py
2
12772
"""Shadow-volume implementation A volume is cast by a light from an edgeset, it's basically the volume of space which is shadowed by the given edgeset/object. """ from OpenGLContext.arrays import * from OpenGL.GL import * import weakref class Volume( object ): """A shadow-volume object This object represents...
lgpl-3.0
teslaji/homebase
venv/HomeBase/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py
1049
1508
import distutils.command.bdist_rpm as orig class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs...
gpl-3.0
JacerOmri/PokemonGo-Bot-Desktop
pywin/Lib/threading.py
26
47132
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys try: import thread except ImportError: del _sys.modules[__name__] raise import warnings from collections import deque as _deque from itertools import count as _count from time import time as _time, sleep as _sleep from ...
mit
kickstandproject/asterisk-testsuite-temporary
tests/channels/pjsip/publish/asterisk_event_mwi/mwi_sender.py
5
1084
#!/usr/bin/env python ''' Copyright (C) 2014, Digium, Inc. Mark Michelson <mmichelson@digium.com> This program is free software, distributed under the terms of the GNU General Public License Version 2. ''' class MWISender(object): '''Test module that updates MWI on the sending Asterisk server. This reads te...
gpl-2.0
dreamhost/akanda-rug
akanda/rug/openstack/common/gettextutils.py
2
1560
# Copyright 2014 DreamHost, LLC # # Author: DreamHost, 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 applicabl...
apache-2.0
ohanar/PolyBoRi
pyroot/polybori/memusage.py
1
1523
import os from sys import maxint _proc_status = '/proc/%d/status' % os.getpid() #_scale = {'kB': 1024.0, 'mB': 1024.0*1024.0, # 'KB': 1024.0, 'MB': 1024.0*1024.0} _scale = {'kB': 1, 'mB': 1024, 'gB': 1024 * 1024, 'KB': 1, 'MB': 1024, 'GB': 1024 * 1024} def _VmB(VmKey): '''Private. ''' ...
gpl-2.0
dnozay/lettuce
tests/integration/lib/Django-1.2.5/django/contrib/localflavor/kw/forms.py
310
1988
""" Kuwait-specific Form helpers """ import re from datetime import date from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField from django.utils.translation import gettext as _ id_re = re.compile(r'^(?P<initial>\d{1})(?P<yy>\d\d)(?P<...
gpl-3.0
ecino/compassion-modules
mobile_app_connector/models/compassion_child_pictures.py
2
1958
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
agpl-3.0
dhp-denero/LibrERP
massive_category_change/wizard/wizard.py
2
1662
# -*- coding: utf-8 -*- # Copyright 2012 Francesco OpenCode Apruzzese <f.apruzzese@andreacometa.it> # # 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 versi...
agpl-3.0
kustodian/ansible
lib/ansible/modules/network/avi/avi_cloudconnectoruser.py
28
4856
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
sbkolate/sap_frappe_v6
frappe/custom/doctype/custom_field/custom_field.py
3
4659
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr from frappe import _ import json from frappe.model.document import Document class CustomField(Document): def autoname(self): self.s...
mit
firmlyjin/brython
www/tests/unittests/test/test_wsgiref.py
25
21880
from __future__ import nested_scopes # Backward compat for 2.1 from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple...
bsd-3-clause
ammaraskar/gunicorn
gunicorn/pidfile.py
31
2291
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from __future__ import with_statement import errno import os import tempfile class Pidfile(object): """\ Manage a PID file. If a specific name is provided it and '"%s.oldpid" % ...
mit
tweemeterjop/thug
thug/ActiveX/modules/ZenturiProgramCheckerAttack.py
1
1826
import logging log = logging.getLogger("Thug") def DownloadFile(self, *arg): log.ThugLogging.add_behavior_warn('[ZenturiProgramChecker ActiveX] Attack in DownloadFile function') log.ThugLogging.add_behavior_warn('[ZenturiProgramChecker ActiveX] Downloading from %s' % (arg[0], )) log.ThugLogging.add_beha...
gpl-2.0
herow/planning_qgis
python/plugins/processing/algs/qgis/PointsToPaths.py
8
5638
# -*- coding: utf-8 -*- """ *************************************************************************** PointsToPaths.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com *************...
gpl-2.0
jazzij/powertoken
background/database.py
1
6870
#imports for database engine import os from sqlalchemy import create_engine from sqlalchemy.pool import NullPool from sqlalchemy.orm import scoped_session, sessionmaker #imports for models from datetime import datetime, timedelta from sqlalchemy import MetaData, Column, ForeignKey, Integer, String, DateTime, Float, Bo...
mit
Aeron/django-evolution
django_evolution/evolve.py
6
2860
import os from django_evolution import EvolutionException, is_multi_db from django_evolution.builtin_evolutions import BUILTIN_SEQUENCES from django_evolution.models import Evolution from django_evolution.mutations import SQLMutation def get_evolution_sequence(app): "Obtain the full evolution sequence for an app...
bsd-3-clause
sahiljain/catapult
third_party/gsutil/third_party/protorpc/protorpc/remote.py
19
39078
#!/usr/bin/env python # # Copyright 2010 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 # # Unless required by applicable law o...
bsd-3-clause
diorcety/intellij-community
python/lib/Lib/site-packages/django/conf/locale/id/formats.py
78
1855
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j N Y' DATETIME_FORMAT = "j N Y, G:i:s" TIME_FORMAT = 'G:i:s' YEAR_MONTH_...
apache-2.0
reshadh/Keepnote-LaTeX
dist/keepnote-0.7.5.win/extensions/latex_prompt/editor_richtext.py
3
57757
""" KeepNote Editor widget in main window """ # # KeepNote # Copyright (c) 2008-2011 Matt Rasmussen # Author: Matt Rasmussen <rasmus@mit.edu> # # 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...
gpl-2.0
eusoubrasileiro/fatiando_seismic
fatiando/gravmag/sphere.py
3
24356
r""" Calculate the potential fields of a homogeneous sphere. **Magnetic** Calculates the magnetic effect produced by an sphere. The functions are based on Blakely (1995). * :func:`~fatiando.gravmag.sphere.tf`: calculates the total-field anomaly * :func:`~fatiando.gravmag.sphere.bx`: calculates the x component of the...
bsd-3-clause
ThiefMaster/jinja2
jinja2/_stringdefs.py
121
589381
# -*- 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...
bsd-3-clause
sitepod/kubernetes
cluster/juju/return-node-ips.py
310
1024
#!/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
mlaitinen/odoo
addons/project_issue/report/project_issue_report.py
303
4652
# -*- 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 GN...
agpl-3.0
SnakeJenny/TensorFlow
tensorflow/contrib/graph_editor/transform.py
46
24592
# 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
semonte/intellij-community
python/helpers/sphinxcontrib/napoleon/docstring.py
44
32526
# -*- coding: utf-8 -*- # Copyright 2014 Rob Ruana # Licensed under the BSD License, see LICENSE file for details. """Classes for docstring parsing and formatting.""" import collections import inspect import re import sys from six.moves import range from pockets import modify_iter from six import string_types _dire...
apache-2.0
ypid/debops-playbooks
playbooks/lookup_plugins/lists.py
2
2142
# (c) 2015, Hartmut Goebel <h.goebel@crazy-compilers.com> # Based on `runner/lookup_plugins/items.py` for Ansible # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Debops. # This file is NOT part of Ansible yet. # # Debops is free software: you can redistribute it and/or modify # it under...
gpl-3.0
LevinJ/ud730-Deep-Learning
A3_regularization/p4_mulitlayer.py
1
3999
from __future__ import print_function import numpy as np import tensorflow as tf from A2_fullyconnected.p1_relulayer import HiddenRelu import math import utility.logger_tool import logging class Mulilayer_HiddenRelu(HiddenRelu): def __init__(self): HiddenRelu.__init__(self) self.num_steps = 120 * ...
gpl-2.0
adrientetar/robofab
Lib/robofab/tools/remote.py
1
4496
"""Remote control for MacOS FontLab. initFontLabRemote() registers a callback for appleevents and runFontLabRemote() sends the code from a different application, such as a Mac Python IDE or Python interpreter. """ from robofab.world import world if world.inFontLab and world.mac is not None: from Carbon import AE as ...
bsd-3-clause
hronoses/vispy
vispy/ext/_bundled/png.py
12
83543
#!/usr/bin/env python # png.py - PNG encoder/decoder in pure Python # # Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org> # Portions Copyright (C) 2009 David Jones <drj@pobox.com> # And probably portions Copyright (C) 2006 Nicko van Someren <nicko@nicko.org> # # Original concept by Johann C. Rocholl. # # ...
bsd-3-clause
noroutine/ansible
lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py
43
13003
#!/usr/bin/python # (c) 2017, NetApp, 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', 'status': ['preview'], ...
gpl-3.0
lsqtongxin/django
django/contrib/admin/helpers.py
146
14347
from __future__ import unicode_literals import warnings from django import forms from django.conf import settings from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.utils import ( display_for_field, flatten_fieldsets, help_text_for_field, label_for_field, lookup_field,...
bsd-3-clause
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Pillow-2.3.0-py2.7-linux-x86_64.egg/PIL/PsdImagePlugin.py
14
7371
# # The Python Imaging Library # $Id$ # # Adobe PSD 2.5/3.0 file handling # # History: # 1995-09-01 fl Created # 1997-01-03 fl Read most PSD images # 1997-01-18 fl Fixed P and CMYK support # 2001-10-21 fl Added seek/tell support (for layers) # # Copyright (c) 1997-2001 by Secret Labs AB. # Copyright (c) 1995-20...
apache-2.0
RadioFreeAsia/RDacity
lib-src/lv2/lv2/plugins/eg-midigate.lv2/waflib/Tools/c.py
329
1066
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib import TaskGen,Task,Utils from waflib.Tools import c_preproc from waflib.Tools.ccroot import link_task,stlink_task @TaskGen.extension('.c') def c_hook(self,node): ...
gpl-2.0
0jpq0/kbengine
kbe/res/scripts/common/Lib/ctypes/test/test_structures.py
79
15780
import unittest from ctypes import * from ctypes.test import need_symbol from struct import calcsize import _testcapi class SubclassesTest(unittest.TestCase): def test_subclass(self): class X(Structure): _fields_ = [("a", c_int)] class Y(X): _fields_ = [("b", c_int)] ...
lgpl-3.0
Bootz/multicore-opimization
llvm/tools/clang/utils/ABITest/Enumeration.py
110
7814
"""Utilities for enumeration of finite and countably infinite sets. """ ### # Countable iteration # Simplifies some calculations class Aleph0(int): _singleton = None def __new__(type): if type._singleton is None: type._singleton = int.__new__(type) return type._singleton def __r...
gpl-3.0
jepler/linuxcnc-mirror
lib/python/qtvcp/plugins/simplewidgets_plugin.py
3
20659
#!/usr/bin/env python from PyQt5 import QtCore, QtGui from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin from qtvcp.widgets.simple_widgets import PushButton from qtvcp.widgets.simple_widgets import CheckBox from qtvcp.widgets.simple_widgets import RadioButton from qtvcp.widgets.simple_widgets import LCDNumber ...
lgpl-2.1
epall/selenium
firefox/src/py/firefoxlauncher.py
4
2957
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 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 # # Unless requ...
apache-2.0
coderb0t/CouchPotatoServer
couchpotato/core/media/_base/providers/torrent/sceneaccess.py
44
5755
import traceback from bs4 import BeautifulSoup from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.media._base.providers.torrent.base import TorrentProvider log = CPLog(__name__) class Base(Torr...
gpl-3.0
Anonymouslemming/ansible
lib/ansible/modules/network/panos/panos_lic.py
78
4915
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
gpl-3.0
gayancliyanage/karma
scripts/travis_after_all.py
93
3418
import os import json import time import logging try: import urllib.request as urllib2 except ImportError: import urllib2 log = logging.getLogger("travis.leader") log.addHandler(logging.StreamHandler()) log.setLevel(logging.INFO) TRAVIS_JOB_NUMBER = 'TRAVIS_JOB_NUMBER' TRAVIS_BUILD_ID = 'TRAVIS_BUILD_ID' POL...
mit
sigurdga/nidarholm
projects/views.py
1
1754
from django.views.generic.list_detail import object_list, object_detail from django.shortcuts import get_object_or_404, render_to_response from django.template.context import RequestContext from django.http import HttpResponseRedirect from projects.models import Project from projects.forms import ProjectForm def pro...
agpl-3.0
RackSec/ansible
lib/ansible/modules/network/nxos/nxos_igmp.py
50
7592
#!/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 distribut...
gpl-3.0
pymedusa/SickRage
ext/oauthlib/oauth1/rfc5849/endpoints/access_token.py
7
9405
# -*- coding: utf-8 -*- """ oauthlib.oauth1.rfc5849.endpoints.access_token ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of the access token provider logic of OAuth 1.0 RFC 5849. It validates the correctness of access token requests, creates and persists tokens as well as create the p...
gpl-3.0
ej2/pixelpuncher
pixelpuncher/npc/utils/conversation.py
1
5304
import random from annoying.functions import get_object_or_None from datetime import datetime from pixelpuncher.game.utils.message import add_game_message from pixelpuncher.game.utils.messages import pixels_dropped_message, xp_gained_message, item_given, \ location_unlocked_message from pixelpuncher.item.utils im...
bsd-3-clause
code-google-com/cortex-vfx
test/IECore/MeshNormalsOpTest.py
8
3581
########################################################################## # # Copyright (c) 2008-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
bsd-3-clause
PetrDlouhy/django
django/utils/six.py
408
30194
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including with...
bsd-3-clause
hgl888/chromium-crosswalk-efl
tools/win/split_link/install_split_link.py
146
3104
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import _winreg import os import shutil import subprocess import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) def IsExe(fpath): return ...
bsd-3-clause
kosz85/django
tests/forms_tests/tests/test_validators.py
111
2210
import re from unittest import TestCase from django import forms from django.core import validators from django.core.exceptions import ValidationError class TestFieldWithValidators(TestCase): def test_all_errors_get_reported(self): class UserForm(forms.Form): full_name = forms.CharField( ...
bsd-3-clause
krishnazure/Flask
Work/Trivia - Module 5/env/Lib/site-packages/pip/req.py
328
83557
from email.parser import FeedParser import os import imp import locale import re import sys import shutil import tempfile import textwrap import zipfile from distutils.util import change_root from pip.locations import (bin_py, running_under_virtualenv,PIP_DELETE_MARKER_FILENAME, write_delete...
apache-2.0
dhodhala88/Bosch1
weblate/trans/management/commands/loadpo.py
9
1599
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
gpl-3.0
pidah/st2contrib
packs/tesla/actions/lib/parsers.py
6
1045
from pytesla import Vehicle __all__ = [ 'FieldLists', 'ResultSets' ] class FieldLists(object): """ The lists of fields we want to return for each class """ VEHICLE = ['id', 'vin', 'mobile_enabled', 'charge_state', 'climate_state', 'drive_state', 'vehicle_state'] ...
apache-2.0
glorizen/nupic
examples/opf/experiments/missing_record/make_datasets.py
34
4661
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
agpl-3.0
notfier/touristique
data/tests/test_views.py
1
3784
from django.core.urlresolvers import reverse from rest_framework import status from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase from data.tests.factories import DepartmentFactory from registration.models import User from ..models import Department class TestDepartment(A...
mit
MadCat34/Sick-Beard
cherrypy/wsgiserver/ssl_builtin.py
74
2542
"""A library for integrating pyOpenSSL with CherryPy. The ssl module must be importable for SSL functionality. To use this module, set CherryPyWSGIServer.ssl_adapter to an instance of BuiltinSSLAdapter. ssl_adapter.certificate: the filename of the server SSL certificate. ssl_adapter.private_key: the filename...
gpl-3.0
HewlettPackard/oneview-redfish-toolkit
oneview_redfish_toolkit/api/processor.py
1
2778
# -*- 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
john-wang-metro/metro-openerp
metro_project/project_gtd.py
2
1195
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
lunafeng/django
tests/gis_tests/tests.py
281
3127
import sys import unittest from django.core.exceptions import ImproperlyConfigured from django.db import ProgrammingError from django.utils import six try: from django.contrib.gis.db.backends.postgis.operations import PostGISOperations HAS_POSTGRES = True except ImportError: HAS_POSTGRES = False except Im...
bsd-3-clause
simod/geonode
geonode/contrib/worldmap/gazetteer/management/commands/updategazetteer.py
2
1208
from django.core.management import BaseCommand from geonode.gazetteer.models import GazetteerEntry from geonode.maps.models import Layer class Command(BaseCommand): help = """ Assigns usernames to all gazetteer features that do not have an associated username yet. """ args = '[none]' # TODO u...
gpl-3.0
geoffarnold/mercador-sub
doc/source/conf.py
1
2460
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
apache-2.0
yoer/hue
desktop/core/ext-py/lxml/src/lxml/html/_html5builder.py
36
3124
""" This module implements a tree builder for html5lib that generates lxml html element trees. This module uses camelCase as it follows the html5lib style guide. """ from html5lib.treebuilders import _base, etree as etree_builders from lxml import html, etree class DocumentType(object): def __init__(self, name...
apache-2.0
crosswalk-project/chromium-crosswalk-efl
gpu/gles2_conform_support/generate_gles2_conform_tests.py
139
1430
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """code generator for OpenGL ES 2.0 conformance tests.""" import os import re import sys def ReadFileAsLines(filename): """Read...
bsd-3-clause
salfab/CouchPotatoServer
libs/tmdb3/pager.py
10
3292
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------- # Name: pager.py List-like structure designed for handling paged results # Python Library # Author: Raymond Wagner #----------------------- from collections import Sequence, Iterator class PagedIterator( Iterator ): def __init__(self, paren...
gpl-3.0
appi147/Jarvis
jarviscli/plugins/timeconv.py
1
4129
from __future__ import division from plugin import plugin @plugin('timeconv') class timeconv(): """ timeconv Documentation. timeconv is a time converter. Supports: picosecond, nanosecond, microsecond, millisecond, second, minute, hour, day, week, month, year Usage: The input time measurement units...
mit
TRESCLOUD/odoopub
openerp/addons/base/tests/test_orm.py
24
17148
from collections import defaultdict from openerp.tools import mute_logger from openerp.tests import common UID = common.ADMIN_USER_ID DB = common.DB class TestORM(common.TransactionCase): """ test special behaviors of ORM CRUD functions TODO: use real Exceptions types instead of Exception """ d...
agpl-3.0
mitodl/salt-extensions
extensions/_utils/yamldumper.py
1
2433
# -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: from yaml import ...
bsd-3-clause
MatthewCox/dotfiles
weechat/python/spell_correction.py
1
33422
# -*- coding: utf-8 -*- # # Copyright (c) 2013-2019 by nils_2 <weechatter@arcor.de> # # a simple spell correction for a "misspelled" word # # 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...
mit
rogerthat-platform/rogerthat-backend
src/rogerthat/bizz/job/re_index_service_identities.py
1
1824
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
apache-2.0
pegasusict/AMM
lib/reportbuilder.py
1
1941
#!/usr/bin/env python3 """ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Audiophiles Music Manager Build 20180119 VER0.0.0PREALPHA * * (C)2017 Mattijs Snepvangers pegasus.ict@gmail.com * * lib/reportbuider.py Report Builder ...
mit
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py
2931
1684
######################## 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...
agpl-3.0
endlessm/chromium-browser
third_party/llvm/lldb/examples/python/x86_64_target_definition.py
6
20727
#!/usr/bin/python #===-- x86_64_target_definition.py -----------------------------*- C++ -*-===// # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------------...
bsd-3-clause