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
lkorigin/laniakea
src/laniakea/repository.py
1
16631
# -*- coding: utf-8 -*- # # Copyright (C) 2016-2019 Matthias Klumpp <matthias@tenstral.net> # # Licensed under the GNU Lesser General Public License Version 3 # # This program 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...
gpl-3.0
p0psicles/SickRage
sickbeard/indexers/indexer_exceptions.py
9
1303
#!/usr/bin/env python2.7 # encoding:utf-8 # author:echel0n # project:indexer_api # repository:http://github.com/echel0n/Sick-Beard # license:unlicense (http://unlicense.org/) """Custom exceptions used or raised by indexer_api""" from tvdb_api.tvdb_exceptions import (tvdb_exception, tvdb_error, tvdb_userabort, tvdb_s...
gpl-3.0
sinkuri256/python-for-android
python3-alpha/python3-src/Lib/distutils/tests/test_cygwinccompiler.py
147
5671
"""Tests for distutils.cygwinccompiler.""" import unittest import sys import os from io import BytesIO import subprocess from test.support import run_unittest from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK...
apache-2.0
Ballz0fSteel/Umeko
lib/youtube_dl/extractor/americastestkitchen.py
13
3098
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( clean_html, int_or_none, try_get, unified_strdate, ) class AmericasTestKitchenIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?americastestkitchen\.com/(?:episode|videos)/(?P<id>\d+...
gpl-3.0
shivaenigma/bitcointools
bitcointools/fixwallet.py
4
3386
#!/usr/bin/env python # # Recover from a semi-corrupt wallet # from bsddb.db import * import logging import sys from wallet import rewrite_wallet, trim_wallet from util import determine_db_dir, create_env def main(): import optparse parser = optparse.OptionParser(usage="%prog [options]") parser.add_option("--da...
mit
pletoss/poclbm
guiminer.py
1
97479
"""GUIMiner - graphical frontend to Bitcoin miners. Currently supports: - m0mchil's "poclbm" - puddinpop's "rpcminer" - jedi95's "Phoenix" - ufasoft's "bitcoin-miner" Copyright 2011 Chris MacLeod This program is released under the GNU GPL. See LICENSE.txt for details. """ import sys, os, subprocess, errno, re, threa...
gpl-3.0
sdague/home-assistant
homeassistant/components/homematicip_cloud/hap.py
6
9395
"""Access point for the HomematicIP Cloud component.""" import asyncio import logging from homematicip.aio.auth import AsyncAuth from homematicip.aio.home import AsyncHome from homematicip.base.base_connection import HmipConnectionError from homematicip.base.enums import EventType from homeassistant.config_entries im...
apache-2.0
kobolabs/calibre
src/calibre/ebooks/conversion/plugins/pml_input.py
22
4852
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import glob import os import shutil from calibre.customize.conversion import InputFormatPlugin from calibre.ptempfile import TemporaryDirectory class PMLInput(InputForm...
gpl-3.0
plumgrid/plumgrid-nova
nova/tests/api/openstack/compute/plugins/v3/test_fixed_ips.py
1
7689
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM Corp. # # 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
bazz-erp/erpnext
erpnext/accounts/doctype/c_form/c_form.py
49
2722
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt from frappe import _ from frappe.model.document import Document class CForm(Document): def validate(self): ...
gpl-3.0
MihaiMoldovanu/ansible
lib/ansible/modules/commands/script.py
26
2754
# Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], ...
gpl-3.0
tanderegg/ansible-modules-core
network/iosxr/iosxr_command.py
8
4918
#!/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
wdwvt1/qiime
tests/test_parallel/test_map_reads_to_reference.py
15
18488
#!/usr/bin/env python # File created on 07 Jul 2012 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Greg Caporaso"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Greg Caporaso" __email__ = "gregcaporaso@gmail.com" from ...
gpl-2.0
xundaokeji/three.js
utils/exporters/blender/addons/io_three/exporter/api/material.py
26
8268
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ material = Non...
mit
tsunammis/software-craftsmanship
development/python/python3-by-learnxinyminutes.py
2
21442
""" Created by learnxinyminutes http://learnxinyminutes.com/docs/python3/ """ # Single line comments start with a number symbol. """ Multiline strings can be written using three "s, and are often used as comments """ #################################################### ## 1. Primitive Datatypes and O...
mit
NaturalGIS/QGIS
python/plugins/processing/algs/grass7/ext/r_li_patchdensity_ascii.py
45
1454
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_patchdensity_ascii.py -------------------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ******...
gpl-2.0
sodafree/backend
django/template/response.py
93
6205
from django.http import HttpResponse from django.template import loader, Context, RequestContext class ContentNotRenderedError(Exception): pass class SimpleTemplateResponse(HttpResponse): rendering_attrs = ['template_name', 'context_data', '_post_render_callbacks'] def __init__(self, template, context=...
bsd-3-clause
kingvuplus/ME-TEST2
lib/actions/parseactions.py
56
1924
# takes a header file, outputs action ids import tokenize, sys, string def filter(g): while 1: t = g.next() if t[1] == "/*": while g.next()[1] != "*/": pass continue if t[1] == "//": while g.next()[1] != "\n": pass continue if t[1] != "\n": # print t yield t[1] def do_file(f, mode)...
gpl-2.0
Ziftr/namecoin
client/jsonrpc/_tests/test_serviceHandler.py
53
6079
""" Copyright (c) 2007 Jan-Klaas Kollhof This file is part of jsonrpc. jsonrpc is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later...
mit
jgabriellima/yowsup
yowsup/layers/protocol_messages/protocolentities/message_text_broadcast.py
64
1185
from .message_text import TextMessageProtocolEntity from yowsup.structs import ProtocolTreeNode import time class BroadcastTextMessage(TextMessageProtocolEntity): def __init__(self, jids, body): broadcastTime = int(time.time() * 1000) super(BroadcastTextMessage, self).__init__(body, to = "%s@broadca...
gpl-3.0
tcpcloud/contrail-controller
src/nodemgr/common/event_manager.py
1
30083
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # import gevent import json import ConfigParser from StringIO import StringIO from ConfigParser import NoOptionError, NoSectionError import sys import os import psutil import socket import time import subprocess from subprocess import Popen, PIPE impor...
apache-2.0
perlygatekeeper/glowing-robot
Little_Alchemy_2/Scraper_python/env/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py
9
17303
"""Dependency Resolution The dependency resolution in pip is performed as follows: for top-level requirements: a. only one spec allowed per project, regardless of conflicts or not. otherwise a "double requirement" exception is raised b. they override sub-dependency requirements. for sub-dependencies ...
artistic-2.0
CanberraUAV/cuav
tests/lib/test_cuav_landingregion.py
1
1452
#!/usr/bin/env python ''' test program for cuav_landingregion ''' import sys, os, time, random, functools import pytest import numpy as np from cuav.lib import cuav_region, cuav_landingregion, mav_position def test_addLandingZone(): lz = cuav_landingregion.LandingZone() for i in range(0, 10): r = cu...
gpl-3.0
BenWiederhake/House-Of-Tweets
backend/twitterConnection.py
2
8292
from birdBackend import BirdBackend import re import threading from soundGenerator import generate_sound import responseBuilder from twitter import TwitterInterface, TweetConsumer, UpdatesConsumer import mq import mylog # Seconds REMOVE_CITIZEN_TIME = 5 * 60 # Must be lowercase. The incoming hashtags will be lowerc...
gpl-3.0
Qalthos/ansible
lib/ansible/modules/network/fortios/fortios_system_virtual_wan_link.py
17
47367
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 Lic...
gpl-3.0
Si-elegans/Web-based_GUI_Tools
django_notify/__init__.py
3
2425
# -*- coding: utf-8 -*- # This package and all its sub-packages are part of django_notify, # except where otherwise stated. # # django_notify 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...
apache-2.0
TeutoNet-Netzdienste/ansible
lib/ansible/utils/module_docs_fragments/rackspace.py
66
4150
# (c) 2014, Matt Martz <matt@sivel.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
gpl-3.0
Marcusz97/CILP_Facilitatore_Audacity
lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/fixpy2.py
332
1110
#! /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 all_modifs={} def fixdir(dir): global all_modifs for k in all_modifs: for v in all_modifs[k]: modif(os.path.join(dir,'waflib'),k,v) def modif(dir,name,fun): ...
gpl-2.0
jlabroquere/SU2
SU2_PY/continuous_adjoint.py
3
5109
#!/usr/bin/env python ## \file continuous_adjoint.py # \brief Python script for continuous adjoint computation using the SU2 suite. # \author F. Palacios, T. Economon, T. Lukaczyk # \version 4.0.1 "Cardinal" # # SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com). # D...
lgpl-2.1
jtgans/squish
lib/squish/takecommand.py
1
4364
#!/usr/bin/env python # -*- python -*- # # Copyright (C) 2008 Google, Inc. All Rights Reserved. # # 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 ...
gpl-2.0
unreal666/outwiker
src/outwiker/gui/editorstyleslist.py
2
3753
# -*- coding: utf-8 -*- import wx class EditorStylesList (wx.Panel): """ Класс контрола для редактирования стилей редактора (цвет шрифта, жирность и т.п., цвет фона пока менять не будем) """ def __init__(self, parent): super(EditorStylesList, self).__init__(parent) self.__create...
gpl-3.0
marcosmodesto/django-testapp
django/contrib/auth/context_processors.py
57
1518
# PermWrapper and PermLookupDict proxy the permissions system into objects that # the template system can understand. class PermLookupDict(object): def __init__(self, user, module_name): self.user, self.module_name = user, module_name def __repr__(self): return str(self.user.get_all_permission...
bsd-3-clause
mikeschiano/SEVEN
node_modules/node-gyp/gyp/tools/pretty_gyp.py
2618
4756
#!/usr/bin/env python # 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. """Pretty-prints the contents of a GYP file.""" import sys import re # Regex to remove comments when we're counting braces. COMMENT_RE = ...
apache-2.0
ericgriffin/metasort
lib/boost/tools/build/v2/test/tag.py
44
3338
#!/usr/bin/python # Copyright (C) 2003. Pedro Ferreira # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild ############################################################################### # # test_f...
apache-2.0
Edraak/edraak-platform
common/lib/xmodule/xmodule/tests/xml/__init__.py
14
2479
""" Xml parsing tests for XModules """ import pprint from django.test import TestCase from lxml import etree from mock import Mock from six import text_type from xmodule.x_module import XMLParsingSystem, policy_key from xmodule.mako_module import MakoDescriptorSystem from xmodule.modulestore.xml import CourseLocationM...
agpl-3.0
Sodki/ansible
lib/ansible/modules/utilities/logic/wait_for.py
21
21884
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # # 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 Licens...
gpl-3.0
eqcorrscan/EQcorrscan
eqcorrscan/__init__.py
1
3103
#!/usr/bin/python """ :copyright: EQcorrscan developers. :license: GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html) """ import importlib import sys import warnings from eqcorrscan.core.match_filter.party import Party # NOQA from eqcorrscan.core.match_filter.family ...
gpl-3.0
chemelnucfin/tensorflow
tensorflow/python/tpu/_tpu_estimator_embedding.py
28
1025
# Copyright 2019 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 applicable ...
apache-2.0
plablo09/geo_context
roc_curve.py
1
3990
# -*- coding: utf-8 -*- import numpy as np import pandas as pd from sklearn import preprocessing from sklearn.decomposition import PCA as sklearnPCA from sklearn import svm from sklearn.metrics import roc_curve, auc from sklearn.cross_validation import StratifiedKFold import matplotlib.pyplot as plt from scipy import ...
apache-2.0
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/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-2.0
james-antill/yum
test/transactiontests.py
11
7012
from yum.constants import * import unittest import settestpath from testbase import * from yum.transactioninfo import TransactionData class TransactionDataTests(unittest.TestCase): ''' Test cases for yum.transactioninfo.TransactionData''' def setUp(self): self.tsInfo = TransactionData() s...
gpl-2.0
Chilledheart/vbox
src/VBox/Additions/common/crOpenGL/Linux_i386_exports.py
22
2622
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys import apiutil def GenerateEntrypoints(): #apiutil.CopyrightC() # Get sorted list of dispatched functions. # The order is very important - it must ...
gpl-2.0
qmarlats/pyquizz
env-3/lib/python3.5/site-packages/sphinx/writers/latex.py
2
77270
# -*- coding: utf-8 -*- """ sphinx.writers.latex ~~~~~~~~~~~~~~~~~~~~ Custom docutils writer for LaTeX. Much of this code is adapted from Dave Kuhlman's "docpy" writer from his docutils sandbox. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE fo...
gpl-3.0
lmprice/ansible
lib/ansible/playbook/task_include.py
26
2872
# (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
asgard-lab/neutron
neutron/plugins/ml2/drivers/linuxbridge/mech_driver/mech_linuxbridge.py
17
2217
# Copyright (c) 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 ...
apache-2.0
jmerkow/VTK
ThirdParty/AutobahnPython/autobahn/wamp/dealer.py
16
13691
############################################################################### ## ## Copyright (C) 2013-2014 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...
bsd-3-clause
Ebag333/Pyfa
gui/commandView.py
1
7036
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
gpl-3.0
wndias/bc.repository
plugin.video.superlistamilton/resources/lib/jsunpack.py
6
1448
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
gpl-2.0
FAForever/client
src/config/__init__.py
1
10828
from . import version import os import sys import locale import logging import fafpath import traceback import faulthandler from PyQt5 import QtCore from logging.handlers import RotatingFileHandler, MemoryHandler if sys.platform == 'win32': import win32api import win32con import win32security import ct...
gpl-3.0
angyukai/boulderactive2016-landing-page
node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
240
23404
#!/usr/bin/env python # 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. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
mit
slank/ansible
lib/ansible/modules/packaging/os/apt_rpm.py
12
5374
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Evgenii Terechkov # Written by Evgenii Terechkov <evg@altlinux.org> # Based on urpmi module written by Philippe Makowski <philippem@mageia.org> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pub...
gpl-3.0
asimshankar/tensorflow
tensorflow/python/autograph/impl/conversion.py
1
16281
# 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
MakeHer/edx-platform
lms/djangoapps/courseware/views.py
1
68336
""" Courseware views functions """ import logging import json import textwrap import urllib from collections import OrderedDict from datetime import datetime from django.utils.translation import ugettext as _ from django.conf import settings from django.core.context_processors import csrf from django.core.exceptions...
agpl-3.0
sunqm/pyscf
pyscf/pbc/cc/kccsd_uhf.py
1
59554
#!/usr/bin/env python # Copyright 2017-2021 The PySCF Developers. 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 # # U...
apache-2.0
baylee-d/osf.io
website/settings/local-travis.py
2
2918
# -*- coding: utf-8 -*- '''Example settings/local.py file. These settings override what's in website/settings/defaults.py NOTE: local.py will not be added to source control. ''' import inspect import logging from . import defaults import os DB_PORT = 54321 DEV_MODE = True DEBUG_MODE = True # Sets app to debug mode...
apache-2.0
GdZ/scriptfile
software/googleAppEngine/lib/yaml/examples/yaml-highlight/yaml_hl.py
95
4429
#!/usr/bin/python import yaml, codecs, sys, os.path, optparse class Style: def __init__(self, header=None, footer=None, tokens=None, events=None, replaces=None): self.header = header self.footer = footer self.replaces = replaces self.substitutions = {} for doma...
mit
cbernet/cpyroot
tools/fitter2d.py
1
1550
from ROOT import gDirectory, TH2F, TH1F, TFile class Fitter2D(object): def __init__(self, *args): self.h2d = TH2F(*args) def draw2D(self, *args): self.h2d.Draw(*args) self.hmean.Draw('psame') def fit(self, bin, opt='0'): hslice = self.h2d.ProjectionY("", bin, bin, ""...
gpl-2.0
attakei/ansible
test/units/parsing/vault/test_vault.py
81
5965
# (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
fuselock/odoo
addons/payment_sips/__openerp__.py
196
1374
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright Eezee-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, eith...
agpl-3.0
tcffisher/namebench
nb_third_party/simplejson/decoder.py
296
15152
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner def _import_c_scanstring(): try: from simplejson._speedups import scanstring return scanstring except ImportError: return None c_scanstring = _import_c_scanstring() __all...
apache-2.0
jcpowermac/ansible
test/units/modules/remote_management/oneview/test_oneview_network_set_facts.py
73
3713
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from ansible.compat.tests import unittest from oneview_module_loader import NetworkSetFactsModule from hpe_test_utils import FactsParamsTestCase ERROR_MSG = ...
gpl-3.0
aswadrangnekar/khandelwal
app/lib/console/app/model/session.py
13
4353
# Based on the Google App Engine Samples project. # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
mit
xianjunzhengbackup/Cloud-Native-Python
env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/response.py
360
18615
from __future__ import absolute_import from contextlib import contextmanager import zlib import io from socket import timeout as SocketTimeout from socket import error as SocketError from ._collections import HTTPHeaderDict from .exceptions import ( ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked ...
mit
akash1808/nova
nova/tests/unit/scheduler/filters/test_image_props_filters.py
66
10627
# 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
tigeraniya/django-allauth
allauth/account/app_settings.py
13
7700
class AppSettings(object): class AuthenticationMethod: USERNAME = 'username' EMAIL = 'email' USERNAME_EMAIL = 'username_email' class EmailVerificationMethod: # After signing up, keep the user account inactive until the email # address is verified MANDATORY = 'ma...
mit
jonobrien/School_Backups
cs1-python/Labs/week 8/hashtable_just docstrings to do.py
1
9432
""" Edited by: Jon O'Brien Due date: 10/29/13 lab8 - hash tables This program is used by word_cout.py to take an input text file and output the number of unique words, total number of words, the words that appeared the most, and the word count. A hash table was used to store the values for the text file and the table...
gpl-3.0
igoralmeida/tahoe-lafs
src/allmydata/scripts/tahoe_ls.py
8
6315
import urllib, time import simplejson from allmydata.scripts.common import get_alias, DEFAULT_ALIAS, escape_path, \ UnknownAliasError from allmydata.scripts.common_http import do_http, format_http_error from allmydata.util.encodingutil import unicode_to_output, quote_output, is_pri...
gpl-2.0
01org/meta-security-isafw
lib/isafw/isaplugins/__init__.py
2
1950
# # __init__.py - part of ISA FW # # Copyright (c) 2015 - 2016, Intel Corporation # # 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, # th...
mit
bguillot/OpenUpgrade
addons/project/__openerp__.py
62
2843
# -*- 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
benthomasson/db-designer
db_designer/db_designer_fsm.py
1
24076
import os import yaml import traceback import logging import random import re from models import Table, Column, ForeignKey from widgets import Wheel, MagnifyingGlassMousePointer, MoveMousePointer def snake_case(name): ''' From: http://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-ca...
gpl-2.0
iamjakob/lumiCalc
LumiDB/test/instlumiInTime.py
1
1892
import os,sys import coral,datetime,time from RecoLuminosity.LumiDB import lumiQueryAPI,lumiTime,csvReporter def main(*args): runnum=0 try: runnum=args[1] report=csvReporter.csvReporter('instlumibytime-'+str(runnum)+'.csv') msg=coral.MessageStream('') msg.setMsgVerbosity(coral.m...
apache-2.0
kYc0o/RIOT
tests/socket_zep/tests/01-run.py
32
2871
#!/usr/bin/env python3 # Copyright (C) 2016 Freie Universität Berlin # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import os import sys import socket from testrunner import run IEEE802154_FRAM...
lgpl-2.1
tmr232/Sark
plugins/function_strings.py
1
1860
from contextlib import suppress import idaapi import idc import sark def show_function_strings(function): idaapi.msg("\n\nString References in {}:0x{:08X}\n".format(function.name, function.start_ea)) idaapi.msg("From To String\n") for xref in function.xrefs_from: with suppress...
mit
noroutine/ansible
lib/ansible/modules/cloud/misc/proxmox_template.py
33
8580
#!/usr/bin/python # # Copyright: Ansible Project # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'...
gpl-3.0
uberfastman/yahoo-fantasy-football-metrics
utils/quickstart.py
1
1463
from __future__ import print_function import os from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file, client, tools # If modifying these scopes, delete the file token.json. # this scope allows the reading and writing of files to Google Drive SCOPES = "https://www.google...
gpl-3.0
Kamp9/scipy
scipy/optimize/linesearch.py
61
24200
""" Functions --------- .. autosummary:: :toctree: generated/ line_search_armijo line_search_wolfe1 line_search_wolfe2 scalar_search_wolfe1 scalar_search_wolfe2 """ from __future__ import division, print_function, absolute_import from warnings import warn from scipy.optimize import minpack2 i...
bsd-3-clause
vxgmichel/python-sequence
sequence/widget/runner/control.py
2
9858
# -*- coding: utf-8 -*- """ Widget to control a Sequence Engine """ #------------------------------------------------------------------------------- # Name: ControlWidget # Purpose: Widget to control a sequence engine # # Author: michel.vincent # # Created: 21/10/2013 # Copyright: (c) michel.vin...
gpl-3.0
Russell-IO/ansible
lib/ansible/playbook/block.py
15
15979
# (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
nkgilley/home-assistant
homeassistant/components/local_ip/sensor.py
16
1143
"""Sensor platform for local_ip.""" from homeassistant.const import CONF_NAME from homeassistant.helpers.entity import Entity from homeassistant.util import get_local_ip from .const import DOMAIN, SENSOR async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the platform from config_entr...
apache-2.0
Mistobaan/tensorflow
tensorflow/python/kernel_tests/batchtospace_op_test.py
23
11767
# 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
Opentrons/labware
api/src/opentrons/protocols/execution/execute_python.py
2
2604
import asyncio import inspect import logging import traceback import sys from typing import Any, Dict from opentrons.drivers.smoothie_drivers.driver_3_0 import SmoothieAlarm from opentrons.protocol_api.contexts import ProtocolContext from opentrons.protocols.execution.errors import ExceptionInProtocolError from opentr...
apache-2.0
gameview/WareCocos2dx
cocos2dx/platform/third_party/marmalade/freetype/src/tools/docmaker/formatter.py
515
4962
# Formatter (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org> # from sources import * from content import * from utils import * # This is the base Formatter class. Its purpose is to convert # a content processor's data into specific documents (i.e., table of # contents, global index, and individual API...
lgpl-3.0
jakirkham/kenjutsu
tests/test_format.py
1
16058
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Dec 08, 2016 14:20:52 GMT-0500$" import doctest import itertools import math import operator import unittest from kenjutsu import format try: irange = xrange except NameError: irange = range # Load doctests from `format`. def load_tests...
bsd-3-clause
Tomtomgo/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
129
3437
# Copyright (C) 2010 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 th...
bsd-3-clause
wwj718/django-rest-framework
setup.py
32
2853
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys from setuptools import setup def get_version(package): """ Return package version as listed in `__version__` in `init.py`. """ init_py = open(os.path.join(package, '__init__.py')).read() return re.search("__version__ = [...
bsd-2-clause
erudit/zenon
eruditorg/apps/userspace/journal/editor/forms.py
1
4017
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import gettext as _ from resumable_uploads.forms import PlUploadFormField from resumable_uploads.models import ResumableFile from core.editor.models import IssueSubmission class ContactModelChoiceField(fo...
gpl-3.0
japeto/Vigtech-Services
env/lib/python2.7/site-packages/django/core/management/commands/shell.py
492
3951
import os from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Runs a Python interactive interpreter. Tries to use IPython or bpython, if one of them is available." requires_system_checks = False shells = ['ipython', 'bpython'] def add_arguments(self, parser): ...
lgpl-3.0
lafayette/JBTT
framework/python/Lib/encodings/iso8859_11.py
593
12591
""" Python Character Mapping Codec iso8859_11 generated from 'MAPPINGS/ISO8859/8859-11.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
mit
PetrDlouhy/django-import-export
tests/core/migrations/0005_addparentchild.py
4
1084
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-19 17:11 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0004_bookwithchapters'), ] operations = [ ...
bsd-2-clause
timopulkkinen/BubbleFish
third_party/bintrees/bintrees/treeslice.py
156
1950
#!/usr/bin/env python #coding:utf-8 # Author: mozman -- <mozman@gmx.at> # Purpose: TreeSlice # Created: 11.04.2011 # Copyright (c) 2010-2013 by Manfred Moitzi # License: MIT License class TreeSlice(object): __slots__ = ['_tree', '_start', '_stop'] def __init__(self, tree, start, stop): self._tree = ...
bsd-3-clause
ikool/metact06-djan
lib/Crypto/SelfTest/Util/test_asn1.py
113
10239
# -*- coding: utf-8 -*- # # SelfTest/Util/test_asn.py: Self-test for the Crypto.Util.asn1 module # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is ...
bsd-3-clause
orbitfp7/nova
nova/objects/instance_numa_topology.py
4
7761
# Copyright 2014 Red Hat 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 ag...
apache-2.0
isnnn/Sick-Beard-TPB
lib/html5lib/tests/test_tokenizer.py
72
6826
import sys import os import unittest import cStringIO import warnings import re try: import json except ImportError: import simplejson as json from support import html5lib_test_files from html5lib.tokenizer import HTMLTokenizer from html5lib import constants class TokenizerTestParser(object): def __init_...
gpl-3.0
pepetreshere/odoo
addons/website_event/tests/common.py
2
4308
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta, time from unittest.mock import patch from odoo.addons.event.tests.common import TestEventCommon from odoo.addons.mail.tests.common import mail_new_test_user from odoo.fields imp...
agpl-3.0
superstack/nova
nova/virt/xenapi/network_utils.py
8
2193
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, 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/LICE...
apache-2.0
sinkuri256/python-for-android
python3-alpha/python3-src/Lib/test/test_queue.py
51
13039
# Some simple queue module tests, plus some failure conditions # to ensure the Queue locks remain stable. import queue import time import unittest from test import support threading = support.import_module('threading') QUEUE_SIZE = 5 def qfull(q): return q.maxsize > 0 and q.qsize() == q.maxsize # A thread to run...
apache-2.0
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/desktop/core/ext-py/Mako-0.8.1/test/test_def.py
36
16341
from mako.template import Template from mako import lookup from test import TemplateTest from test.util import flatten_result, result_lines from test import eq_, assert_raises from mako import compat class DefTest(TemplateTest): def test_def_noargs(self): template = Template(""" ${mycomp()} ...
gpl-2.0
Prestoroasters/artisan
artisanlib/list_ports_osx.py
9
6908
#!/usr/bin/python # -*- coding: utf-8 -*- # # list_ports_osx.py # # Copyright (c) 2013, Paul Holleis, Marko Luther # All rights reserved. # # # LICENSE # # 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 Fo...
gpl-3.0
wallnerryan/flocker-profiles
flocker/node/testtools.py
6
12953
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Testing utilities for ``flocker.node``. """ from functools import wraps import os import pwd from unittest import skipIf from uuid import uuid4 from distutils.version import LooseVersion import psutil from zope.interface import implementer from charact...
apache-2.0
i2c2-caj/CS4990
Homework/crminal/crm/views.py
1
3329
from django.shortcuts import render #from viewsets import ModelViewSet from django.views.generic import TemplateView from .models import * from django.db.models import Count from django.contrib.auth.models import User from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic imp...
gpl-2.0