repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
2ndQuadrant/ansible
lib/ansible/modules/source_control/github_webhook_facts.py
22
5087
#!/usr/bin/python # # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'],...
gpl-3.0
ambitioninc/django-user-guide
user_guide/templatetags/user_guide_tags.py
1
2767
""" Template tag for displaying user guides. """ import re from django import template from django.conf import settings from django.template import loader from django.template.defaulttags import CsrfTokenNode from user_guide.models import GuideInfo register = template.Library() # The maximum number of guides to sh...
mit
vlachoudis/sl4a
python/src/Lib/lib2to3/fixes/fix_xrange.py
49
2291
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that changes xrange(...) into range(...).""" # Local imports from .. import fixer_base from ..fixer_util import Name, Call, consuming_calls from .. import patcomp class FixXrange(fixer_base.BaseFix): PA...
apache-2.0
praekelt/django-ultracache
bin/cache-purge-consumer.py
1
3973
"""Subscribe to RabbitMQ and listen for purge instructions continuously. Manage this script through eg. supervisor.""" import json import traceback from multiprocessing.pool import ThreadPool from optparse import OptionParser from time import sleep import pika import requests import yaml class Consumer: channe...
bsd-3-clause
iivvoo/kodiekar
vanderwijk.iivvoo.kar/resources/lib/winpdb-1.4.8/rpdb2.py
7
404319
#! /usr/bin/env python """ rpdb2.py - version 2.4.8 A remote Python debugger for CPython Copyright (C) 2005-2009 Nir Aides 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;...
mit
irwinlove/scrapy
tests/test_downloadermiddleware_decompression.py
133
1851
from unittest import TestCase, main from scrapy.http import Response, XmlResponse from scrapy.downloadermiddlewares.decompression import DecompressionMiddleware from scrapy.spiders import Spider from tests import get_testdata from scrapy.utils.test import assert_samelines def _test_data(formats): uncompressed_bod...
bsd-3-clause
adviti/melange
tests/app/soc/logic/test_dicts.py
1
13831
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # 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 applic...
apache-2.0
jbhuang0604/CF2
external/matconvnet/utils/proto/caffe_b590f1d_pb2.py
6
232112
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='caffe_b590f1d.pr...
mit
prospwro/odoo
addons/google_spreadsheet/google_spreadsheet.py
242
5617
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General...
agpl-3.0
tenvick/hugular_cstolua
Client/tools/site-packages/PIL/PcdImagePlugin.py
14
1827
# # The Python Imaging Library. # $Id: PcdImagePlugin.py 2134 2004-10-06 08:55:20Z fredrik $ # # PCD file handling # # History: # 96-05-10 fl Created # 96-05-27 fl Added draft mode (128x192, 256x384) # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # # See the README file f...
mit
myriasofo/CLRS_exercises
algos/testSuite.py
1
6292
''' WHAT: Simple test framework for checking algorithms TASK: *Handle output that's an object, eg. bst that gets modified *option3: optional param - Class (accept input/output as arrays and TURN INTO object) (option1: optional param - comparison function (instead of simple "!=") (option2: optional param - Class (autom...
mit
EvanK/ansible
lib/ansible/modules/cloud/azure/azure_rm_trafficmanagerprofile.py
5
16548
#!/usr/bin/python # # Copyright (c) 2018 Hai Cao, <t-haicao@microsoft.com> Yunge Zhu <yungez@microsoft.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 ANSIBLE_METADATA = {'metadata...
gpl-3.0
square/pants
tests/python/pants_test/jvm/test_artifact.py
2
1154
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) from pants.backend.j...
apache-2.0
nburn42/tensorflow
tensorflow/examples/learn/text_classification_character_cnn.py
33
5463
# 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 appl...
apache-2.0
SevenW/httpwebsockethandler
HTTPWebSocketsHandler.py
2
9397
''' The MIT License (MIT) Copyright (C) 2014, 2015 Seven Watt <info@sevenwatt.com> <http://www.sevenwatt.com> 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 ...
mit
tis-intern-apparel/ApparelStrategy
server/dialogue_system/module/database.py
1
5633
# -*- coding: utf-8 -*- import os import codecs class Personal: point_id = '' user_name = '' user_pronoun = '' sex = '' phone = '' email = '' address = '' class Cloth: cloth_name = '' color_code = '' small_type = '' price = '' image_url = '' big_type = '' cloth...
mit
django-notifications/django-notifications
notifications/views.py
1
7702
# -*- coding: utf-8 -*- ''' Django Notifications example views ''' from distutils.version import \ StrictVersion # pylint: disable=no-name-in-module,import-error from django import get_version from django.contrib.auth.decorators import login_required from django.forms import model_to_dict from django.shortcuts im...
bsd-3-clause
balamuruhans/avocado-vt
scripts/tapfd_helper.py
8
1865
#!/usr/bin/python import sys import os import re # simple magic for using scripts within a source tree basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(basedir, 'virttest')): sys.path.append(basedir) from virttest import utils_net def destroy_tap(tapfd_list): ...
gpl-2.0
agoose77/hivesystem
tutorial/layers/layer17/layers.py
1
2334
from __future__ import print_function # import the main and action components from maincomponent import maincomponent from action1 import action1component from action2 import action2component from action3 import action3component #import manager components from action3components import animationmanager from action3com...
bsd-2-clause
837468220/python-for-android
python3-alpha/python3-src/PC/VC6/build_tkinter.py
91
2060
import os import sys import subprocess TCL_MAJOR = 8 TCL_MINOR = 5 TCL_PATCH = 2 TIX_MAJOR = 8 TIX_MINOR = 4 TIX_PATCH = 3 def abspath(name): par = os.path.pardir return os.path.abspath(os.path.join(__file__, par, par, par, par, name)) TCL_DIR = abspath("tcl%d.%d.%d" % (TCL_MAJOR, TCL_MINOR, TCL_PATCH)) TK_...
apache-2.0
supersven/intellij-community
python/lib/Lib/modjy/modjy_write.py
109
1441
### # # Copyright Alan Kennedy. # # You may contact the copyright holder at this uri: # # http://www.xhaus.com/contact/modjy # # The licence under which this code is released is the Apache License v2.0. # # The terms and conditions of this license are listed in a file contained # in the distribution that also cont...
apache-2.0
cackharot/fbeazt
src/foodbeazt/resources/order.py
1
13147
import time from datetime import datetime from bson import ObjectId, json_util from collections import defaultdict from flask import g, request from flask_mail import Message from flask_restful import Resource from service.OrderService import OrderService, DuplicateOrderException from service.PushNotificationService im...
apache-2.0
TeamExodus/external_chromium_org
build/android/pylib/gtest/test_runner.py
32
7433
# 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. import logging import os import re from pylib import constants from pylib import pexpect from pylib.base import base_test_result from pylib.base import ...
bsd-3-clause
ssssam/calliope
calliope/stat/__init__.py
1
1520
#!/usr/bin/env python3 # Calliope # Copyright (C) 2016 Sam Thursfield <sam@afuera.me.uk> # # 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)...
gpl-2.0
Evervolv/android_external_chromium_org
ppapi/native_client/tests/breakpad_crash_test/crash_dump_tester.py
154
8545
#!/usr/bin/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. import os import subprocess import sys import tempfile import time script_dir = os.path.dirname(__file__) sys.path.append(os.path.join...
bsd-3-clause
blaggacao/OpenUpgrade
addons/gamification/models/__init__.py
389
1038
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
quang-ha/lammps
tools/moltemplate/moltemplate/nbody_by_type.py
3
30584
#!/usr/bin/env python # Author: Andrew Jewett (jewett.aij at g mail) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2011, Regents of the University of California # All rights reserved. man_page_text = """ nbody_by_type.py reads a LAMMPS data file ...
gpl-2.0
ychaim/explorer
homepage/forms.py
2
1147
from django import forms from django.utils.translation import ugettext_lazy as _ from blockcypher.constants import COIN_CHOICES from blockcypher.utils import is_valid_address, is_valid_hash, is_valid_block_num from blockexplorer.walletname import is_valid_wallet_name import re class SearchForm(forms.Form): sea...
apache-2.0
spb-tools/lappis_vimrc
.vim/bundle/python-syntax/test.py
4
2674
#! /usr/bin/env python # -*- coding: utf-8 -*- # Above the run-comment and file encoding comment. # Comments. # TODO FIXME XXX # Keywords. with break continue del exec return pass print raise global assert lambda yield for while if elif else import from as try except finally and in is not or yield from def functi...
lgpl-3.0
DrSkippy/Gravitational-Three-Body-Symmetric
sim_pendulum.py
1
1975
#!/usr/bin/env python import csv import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.style.use('ggplot') # arg 1 = w init # arg 2 = n periods # arg 3 = n ratio # time step dt = np.float64(0.00010) # constants L_0 = np.float64(1.0) # unstretched length g = np.float64(9.81) # grav...
cc0-1.0
metpy/SHARPpy
sharppy/version.py
1
1931
import os.path import subprocess release = False __version__ = '0.2' _repository_path = os.path.split(__file__)[0] _git_file_path = os.path.join(_repository_path, '__git_version__.py') def _minimal_ext_cmd(cmd): # construct minimal environment env = {} for k in ['SYSTEMROOT', 'PATH']: v = os.env...
bsd-3-clause
NunoEdgarGub1/elements
qa/rpc-tests/getblocktemplate_proposals.py
151
6294
#!/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. from test_framework import BitcoinTestFramework from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCExce...
mit
areeda/gwpy
gwpy/utils/tests/test_mp.py
3
2089
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
gpl-3.0
brian-o/CS-CourseWork
CS491/Program2/testForks.py
1
2677
############################################################ ''' testForks.py Written by: Brian O'Dell, Spetember 2017 A program to run each program a 500 times per thread count. Then uses the data collected to make graphs and tables that are useful to evaluate the programs running time. ''' ######...
gpl-3.0
PennyDreadfulMTG/Penny-Dreadful-Tools
modo_bugs/fetcher.py
1
4118
import os import sys from typing import Dict, List, Optional, Tuple from bs4 import BeautifulSoup from bs4.element import Tag from shared import fetch_tools, lazy def search_scryfall(query: str) -> Tuple[int, List[str], List[str]]: """Returns a tuple. First member is an integer indicating how many cards match t...
gpl-3.0
iuliat/nova
nova/tests/unit/compute/test_compute_mgr.py
6
180915
# 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
heldergg/webpymail
webpymail/sabapp/models.py
1
2844
# -*- coding: utf-8 -*- # sabapp - Simple Address Book Application # Copyright (C) 2008 Helder Guerreiro # This file is part of sabapp. # # sabapp 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...
gpl-3.0
tonybaloney/st2contrib
packs/duo/actions/auth_check.py
3
1285
#!/usr/bin/env python # Licensed to the StackStorm, Inc ('StackStorm') 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 "Licens...
apache-2.0
silentfuzzle/calibre
src/calibre/devices/kobo/driver.py
1
147621
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import division __license__ = 'GPL v3' __copyright__ = '2010-2012, Timothy Legge <timlegge@gmail.com>, Kovid Goyal <kovid@kovidgoyal.net> and David Forrester <davidfor@internode.on.net>' __docformat__ = 'restructuredtext en' '...
gpl-3.0
ghostshellgnome/clamwin
py/ClamTray.py
1
38009
#----------------------------------------------------------------------------- # Name: Tray.py # Product: ClamWin Free Antivirus # # Author: alch [alch at users dot sourceforge dot net] # # Created: 2004/19/03 # Copyright: Copyright alch (c) 2005 # Licence: # This program is free softwa...
gpl-2.0
gfyoung/pandas
pandas/tests/io/pytables/test_complex.py
1
6374
from warnings import catch_warnings import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm from pandas.tests.io.pytables.common import ensure_clean_path, ensure_clean_store from pandas.io.pytables import read_h...
bsd-3-clause
ric2b/Vivaldi-browser
chromium/chrome/common/extensions/docs/server2/redirector.py
44
3762
# 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. import posixpath from urlparse import urlsplit from file_system import FileNotFoundError from future import All from path_util import Segment, Join, SplitPa...
bsd-3-clause
JeanKossaifi/scikit-learn
sklearn/externals/joblib/logger.py
359
5135
""" Helpers for logging. This module needs much love to become useful. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2008 Gael Varoquaux # License: BSD Style, 3 clauses. from __future__ import print_function import time import sys import os import shutil import logging impo...
bsd-3-clause
vmarkovtsev/django
django/contrib/contenttypes/forms.py
376
3849
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.db import models from django.forms import ModelForm, modelformset_factory from django.forms.models import BaseModelFormSet class BaseGenericInlineFormSet(BaseModelFormSet): """ A formset for generic...
bsd-3-clause
timwee/emacs-starter-kit-mr-flip-forked
vendor/rope/rope/base/fscommands.py
3
6767
"""Project file system commands. This modules implements file system operations used by rope. Different version control systems can be supported by implementing the interface provided by `FileSystemCommands` class. See `SubversionCommands` and `MercurialCommands` for example. """ import os import shutil import subp...
gpl-3.0
pombreda/namebench
nb_third_party/jinja2/_stringdefs.py
412
404256
# -*- 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...
apache-2.0
pepeportela/edx-platform
cms/djangoapps/maintenance/views.py
8
7584
""" Views for the maintenance app. """ import logging from django.core.validators import ValidationError from django.db import transaction from django.utils.decorators import method_decorator from django.utils.translation import ugettext as _ from django.views.generic import View from opaque_keys import InvalidKeyErro...
agpl-3.0
jelly/calibre
manual/plugin_examples/interface_demo/config.py
16
1337
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from PyQt5.Qt...
gpl-3.0
daavery/audacity
lib-src/lv2/serd/waflib/Tools/python.py
177
13335
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys from waflib import Utils,Options,Errors,Logs from waflib.TaskGen import extension,before_method,after_method,feature from waflib.Configure import conf FRAG=''' #...
gpl-2.0
murat8505/dredit_text_editor_Google-Drive
python/lib/oauth2client/locked_file.py
9
10217
# Copyright 2011 Google Inc. All Rights Reserved. """Locked file interface that should work on Unix and Windows pythons. This module first tries to use fcntl locking to ensure serialized access to a file, then falls back on a lock file if that is unavialable. Usage: f = LockedFile('filename', 'r+b', 'rb') f....
apache-2.0
DreadPirateRobert/stock_visualiser
stock_visualiser_virtualenv/lib/python3.5/site-packages/setuptools/command/sdist.py
50
6919
from distutils import log import distutils.command.sdist as orig import os import sys import io import contextlib from setuptools.extern import six from .py36compat import sdist_add_defaults import pkg_resources _default_revctrl = list def walk_revctrl(dirname=''): """Find all files under revision control""" ...
mit
S0lll0s/powerline
powerline/commands/daemon.py
34
1203
# vim:fileencoding=utf-8:noet from __future__ import (division, absolute_import, print_function) import argparse def get_argparser(ArgumentParser=argparse.ArgumentParser): parser = ArgumentParser(description='Daemon that improves powerline performance.') parser.add_argument( '--quiet', '-q', action='store_true',...
mit
kuiwei/kuiwei
lms/djangoapps/psychometrics/models.py
150
1876
# # db model for psychometrics data # # this data is collected in real time # from django.db import models from courseware.models import StudentModule class PsychometricData(models.Model): """ This data is a table linking student, module, and module performance, including number of attempts, grade, max g...
agpl-3.0
SelfDrivUTT/selfdrivutt
robot/raspberry/controls.py
1
3292
import socket import sys import os import curses from threading import Thread class RemoteControlServer(object): """docstring for Curses_control""" def __init__(self): super(RemoteControl, self).__init__() self.data = '' self.stopped = False self.HOST = os.environ.get('COMMAND_...
mit
krafczyk/spack
var/spack/repos/builtin/packages/pacbio-dazz-db/package.py
2
2331
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
mwx1993/TACTIC
3rd_party/CherryPy/cherrypy/process/plugins.py
6
20583
"""Site services for use with a Web Site Process Bus.""" import os import re try: set except NameError: from sets import Set as set import signal as _signal import sys import time import thread import threading # _module__file__base is used by Autoreload to make # absolute any filenames retrieved from sys.mod...
epl-1.0
gregbdunn/aws-ec2rescue-linux
lib/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
285
5702
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re import sys # ipaddress has been backported to 2.6+ in pypi. If it is installed on the # system, us...
apache-2.0
dpiers/coderang-meteor
public/jsrepl/extern/python/closured/lib/python2.7/encodings/cp437.py
593
34820
""" Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict...
mit
fighterCui/L4ReFiascoOC
l4/pkg/python/contrib/Tools/pynche/StripViewer.py
100
15465
"""Strip viewer and related widgets. The classes in this file implement the StripViewer shown in the top two thirds of the main Pynche window. It consists of three StripWidgets which display the variations in red, green, and blue respectively of the currently selected r/g/b color value. Each StripWidget shows the co...
gpl-2.0
robhudson/zamboni
apps/amo/messages.py
3
2100
from functools import partial from django.contrib import messages as django_messages import jinja2 from jingo import env """ This file was created because AMO wants to have multi-line messages including a title and some content. Django's messages framework only takes a single string. Importing this file should beha...
bsd-3-clause
all-of-us/raw-data-repository
rdr_service/alembic/versions/434fb0f05794_add_ignore_and_dev_note_to_genomics_.py
1
1673
"""add ignore and dev note to genomics models. Revision ID: 434fb0f05794 Revises: 994dfe6e53ee Create Date: 2020-09-30 14:39:16.244636 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '434fb0f05794' down_revision = '994dfe6e53ee' branch_labels = None depends_on =...
bsd-3-clause
oscarolar/odoo
addons/survey/test/__init__.py
118
1043
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
manashmndl/dfvfs
dfvfs/vfs/gzip_file_system.py
2
1057
# -*- coding: utf-8 -*- """The gzip file system implementation.""" from dfvfs.lib import definitions from dfvfs.path import gzip_path_spec from dfvfs.vfs import gzip_file_entry from dfvfs.vfs import root_only_file_system class GzipFileSystem(root_only_file_system.RootOnlyFileSystem): """Class that implements a fil...
apache-2.0
dannyroberts/eulxml
eulxml/xmlmap/premis.py
1
5516
# file eulxml/xmlmap/premis.py # # Copyright 2010,2011 Emory University Libraries # # 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
z1gm4/desarrollo_web_udp
env/lib/python2.7/site-packages/pbr/hooks/metadata.py
101
1076
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # Unles...
gpl-3.0
derwind/otfparser
misc_scripts/aalt_analyzer.py
2
4656
#! /usr/bin/env python # -*- coding: utf-8 -*- import os, sys from fontTools.ttLib import TTFont script_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(script_dir) from gsub_analyzer import * class SubstitutionMap(Renderer): def __init__(self): super(SubstitutionMap, self).__init__() ...
apache-2.0
Duoxilian/home-assistant
homeassistant/components/media_player/mpchc.py
11
5002
""" Support to interface with the MPC-HC Web API. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.mpchc/ """ import logging import re import requests import voluptuous as vol from homeassistant.components.media_player import ( SUPPORT_V...
mit
TangHao1987/intellij-community
python/lib/Lib/distutils/versionpredicate.py
397
5095
"""Module for parsing and testing package version predicate strings. """ import re import distutils.version import operator re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)") # (package) (rest) re_paren = re.compile(r"^\s*\((.*)\)\s*$") # (list) inside of parentheses re_splitComparison = re.com...
apache-2.0
afandria/sky_engine
build/protoc_java.py
78
2330
#!/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. """Generate java source files from protobuf files. This is a helper file for the genproto_java action in protoc_java.gypi. It per...
bsd-3-clause
mightbejosh/dj-braintree
djbraintree/admin.py
1
6860
# -*- coding: utf-8 -*- """ Note: Django 1.4 support was dropped in #107 https://github.com/pydanny/dj-braintree/pull/107 """ from django.contrib import admin from .models import Transaction from .models import Customer class CustomerHasCardListFilter(admin.SimpleListFilter): title = "card presence" ...
bsd-3-clause
ericchill/gnofract4d
fract4d/fc.py
1
16906
#!/usr/bin/env python # A compiler from UltraFractal or Fractint formula files to C code # The UltraFractal manual is the best current description of the file # format. You can download it from http://www.ultrafractal.com/uf3-manual.zip # The implementation is based on the outline in "Modern Compiler # Implementatio...
bsd-3-clause
crobby/sahara
sahara/plugins/mapr/services/maprfs/maprfs.py
9
4534
# Copyright (c) 2015, MapR Technologies # # 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
devilry/devilry-django
devilry/devilry_group/tests/test_feedbackfeed/mixins/mixin_feedbackfeed_admin.py
1
30195
# -*- coding: utf-8 -*- import mock from django import http from django.conf import settings from django.http import Http404 from django.utils import timezone from model_bakery import baker from devilry.apps.core import models as core_models from devilry.devilry_account import models as account_models from devilry....
bsd-3-clause
henrysher/yum
yummain.py
2
12855
#!/usr/bin/python -t # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it...
gpl-2.0
codilime/cloudify-manager
tests/workflow_tests/test_retrieve_resource_rendering.py
1
2274
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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 requir...
apache-2.0
mtaufen/test-infra
gubernator/third_party/defusedxml/lxml.py
53
4922
# defusedxml # # Copyright (c) 2013 by Christian Heimes <christian@python.org> # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. """Example code for lxml.etree protection The code has NO protection against decompression bombs. """ from __future__ import pri...
apache-2.0
sileht/pifpaf
pifpaf/drivers/zookeeper.py
1
2019
# 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
40223221/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/_string.py
625
1112
"""string helper module""" import re class __loader__(object): pass def formatter_field_name_split(fieldname): """split the argument as a field name""" _list=[] for _name in fieldname: _parts = _name.split('.') for _item in _parts: is_attr=False #fix me if re....
gpl-3.0
sam-m888/gramps
gramps/gui/plug/export/_exportassistant.py
1
24356
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2004-2007 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Contribution 2009 by Brad Crittenden <brad [AT] bradcrittenden.net> # Copyright (C) 2008 Benny Malengier # Copyright (C) 2010 Jakim Friant # # This program is free...
gpl-2.0
40223236/2015examQ1
static/Brython3.1.1-20150328-091302/Lib/signal.py
743
1646
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [...
gpl-3.0
Gui13/CouchPotatoServer
libs/requests/packages/chardet/latin1prober.py
950
5241
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
andrius-preimantas/odoo
addons/crm_helpdesk/__init__.py
442
1081
# -*- 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
blueboxgroup/nova
nova/tests/unit/virt/vmwareapi/test_network_util.py
21
7270
# Copyright (c) 2014 VMware, 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 requir...
apache-2.0
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/test/test_copy_reg.py
129
4256
import copy_reg import unittest from test import test_support from test.pickletester import ExtensionSaver class C: pass class WithoutSlots(object): pass class WithWeakref(object): __slots__ = ('__weakref__',) class WithPrivate(object): __slots__ = ('__spam',) class WithSingleString(object): ...
mit
beiko-lab/gengis
bin/Lib/cookielib.py
3
66242
"""HTTP cookie handling for web clients. This module has (now fairly distant) origins in Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library. Docstrings, comments and debug strings in this code refer to the attributes of the HTTP cookie system as cookie-attributes, to distinguish them clearly fr...
gpl-3.0
ryfeus/lambda-packs
Tensorflow_OpenCV_Nightly/source/tensorflow/python/training/training_ops.py
131
1046
# 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...
mit
haad/ansible
lib/ansible/plugins/strategy/__init__.py
4
51399
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
allo-/django-bingo
bingo/times.py
1
3716
from django.utils import timezone from django.conf import settings from . import config from datetime import datetime, timedelta def now(): return timezone.localtime() def get_times(site): time_now = now() start_time_begin = config.get("start_time_begin", site=site) if start_time_begin is not None: ...
agpl-3.0
patrickhoefler/lwd
lwd.py
1
7546
#!/usr/bin/python # -*- coding: utf-8 -*- # Functions for turning the Wikidata dump into Linked Data import codecs import glob import gzip import json import math import os import sys import time import xml.etree.cElementTree as ET import settings def process_dump(): # Print some status info print 'Proces...
mit
dburner/zidoo-kodi-14.2
tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py
138
6987
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008-2013 Team XBMC # # 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) ...
gpl-2.0
yohanko88/gem5-DC
src/arch/x86/isa/insts/simd128/floating_point/arithmetic/multiplication.py
91
3967
# 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
Silmathoron/nest-simulator
pynest/nest/tests/test_connect_fixed_indegree.py
10
5729
# -*- coding: utf-8 -*- # # test_connect_fixed_indegree.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
gpl-2.0
johnbachman/belpy
indra/sources/sofia/api.py
1
5047
import json import time import openpyxl import requests from indra.config import get_config from .processor import SofiaJsonProcessor, SofiaExcelProcessor def process_table(fname): """Return processor by processing a given sheet of a spreadsheet file. Parameters ---------- fname : str The nam...
mit
santisiri/popego
popego/popserver/popserver/agents/blog_agent.py
3
4879
# -*- coding: utf-8 -*- __docformat__='restructuredtext' from datetime import datetime from time import mktime from urllib2 import urlopen from HTMLParser import HTMLParser, HTMLParseError from popserver.lib.functional import findFirst from popserver.lib.util import stripHTMLTags import feedparser def accountHome(ac...
bsd-3-clause
ahua/pythondotorg
pages/models.py
9
3276
""" Simple "flat pages". These get used for the static (non-automated) large chunks of content. Notice that pages don't have any actual notion of where they live; instead, they're positioned into the URL structure using the nav app. """ import os import re from django.conf import settings from django.core import val...
apache-2.0
kool79/intellij-community
python/lib/Lib/site-packages/django/contrib/comments/moderation.py
246
13528
""" A generic comment-moderation system which allows configuration of moderation options on a per-model basis. To use, do two things: 1. Create or import a subclass of ``CommentModerator`` defining the options you want. 2. Import ``moderator`` from this module and register one or more models, passing the model...
apache-2.0
vinayan3/clpricehistory
django/db/models/fields/related.py
82
54635
from django.conf import settings from django.db import connection, router, transaction, connections from django.db.backends import util from django.db.models import signals, get_model from django.db.models.fields import (AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotEx...
bsd-3-clause
abdullah2891/remo
remo/profiles/tests/__init__.py
3
6199
import datetime from random import randint from django.db.models.signals import pre_save, post_save from django.contrib.auth.models import User, Group from django.utils.timezone import now, utc import factory from factory import fuzzy from product_details import product_details from remo.profiles.models import (Func...
bsd-3-clause
koobonil/Boss2D
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/python/saved_model/builder_impl.py
14
18599
# 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...
mit
etzhou/edx-platform
common/test/acceptance/tests/video/test_video_handout.py
136
6655
# -*- coding: utf-8 -*- """ Acceptance tests for CMS Video Handout. """ from nose.plugins.attrib import attr from .test_studio_video_module import CMSVideoBaseTest @attr('shard_5') class VideoHandoutTest(CMSVideoBaseTest): """ CMS Video Handout Test Class """ def setUp(self): super(VideoHand...
agpl-3.0