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
shadyueh/pyranking
env/lib/python2.7/site.py
784
27543
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
mit
michalkurka/h2o-3
h2o-py/tests/testdir_parser/pyunit_NOFEATURE_hexdev_497_import_gzip_airlines_no_first_header.py
6
1900
from __future__ import print_function import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils # This test is to make sure that we have fixed the following JIRA properly using airlines data: # HEXDEV-497: Merged Gzip Files not read properly. # I will import the original files and then the zip d...
apache-2.0
lbeltrame/bcbio-nextgen
bcbio/variation/vfilter.py
4
10588
"""Cutoff-based soft filtering of genomic variants. """ from distutils.version import LooseVersion import math import os import shutil import numpy import toolz as tz import yaml from bcbio import broad, utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils from bcbi...
mit
Leandros/XBMC-Repository
script.module.requests2/lib/requests/packages/chardet/constants.py
3008
1335
######################## 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-2.0
ehirt/odoo
addons/account_bank_statement_extensions/wizard/confirm_statement_line.py
381
1490
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
vlachoudis/sl4a
python/src/Demo/classes/Range.py
47
3126
"""Example of a generator: re-implement the built-in range function without actually constructing the list of values. OldStyleRange is coded in the way required to work in a 'for' loop before iterators were introduced into the language; using __getitem__ and __len__ . """ def handleargs(arglist): """Take list of ...
apache-2.0
markflorisson/blaze-core
blaze/catalog/blaze_url.py
13
3712
from __future__ import absolute_import, division, print_function __all__ = ['split_array_base', 'add_indexers_to_url', 'slice_as_string', 'index_tuple_as_string'] from pyparsing import (Word, Regex, Optional, ZeroOrMore, StringStart, StringEnd, alphas, alphanums) from ..py2help impor...
bsd-3-clause
martinbede/second-sight
tensorflow/python/kernel_tests/denormal_test.py
15
2182
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
martinwicke/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/models/forest_to_data_then_nn.py
190
1972
# 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
ambitioninc/django-narrative
narrative/tests/assertion_tests.py
1
22006
import datetime import json from django.conf import settings from django.contrib.auth.models import Group, User from django.core import mail from django.test import TestCase from ..assertions import Assertion from ..executor import Executor from ..models import (Solution, AssertionMeta, Issue, ResolutionStep, ...
mit
MyAOSP/external_chromium_org
build/android/pylib/instrumentation/test_jar.py
27
8479
# 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. """Helper class for instrumenation test jar.""" import collections import logging import os import pickle import re from pylib import cmd_helper from p...
bsd-3-clause
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/django/contrib/gis/geos/libgeos.py
345
6218
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re from ctypes import CD...
mit
narsuman/testlink-code
third_party/fckeditor/editor/filemanager/connectors/py/connector.py
45
4118
#!/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://www.gn...
gpl-2.0
danielharbor/openerp
addons/portal_gamification/__openerp__.py
381
1571
# -*- 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
STIXProject/stixproject.github.io
documentation/idioms/openioc-test-mechanism/openioc-test-mechanism-consumer.py
2
1042
#!/usr/bin/env python # Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. ''' The following code requires python-stix v1.1.1.0 or greater installed. For installation instructions, please refer to https://github.com/STIXProject/python-stix. ''' from stix.core import ...
bsd-3-clause
t4skforce/PenTestingUnit
src/app/blueprints/gpsd/__init__.py
1
1216
from flask import Blueprint, redirect, url_for, request from functools import wraps from flask_login import login_required from ...lib.models import * from ... import app, db, socketio from ...lib.systemd import Systemd import eventlet, traceback, time gpsd = Blueprint('gpsd', __name__, template_folder='templates', st...
mit
madscatt/zazzie_1.5
trunk/sassie/simulate/energy/python_energy_calc.py
3
5109
''' SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D. 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 later version. ...
gpl-3.0
fyabc/MiniGames
HearthStone2/test/cards_statistic.py
1
5383
#! /usr/bin/python # -*- coding: utf-8 -*- from collections import defaultdict import glob import sys import re import numpy as np import matplotlib.pyplot as plt __author__ = 'fyabc' def _get_int(v): if v is None: return None return int(v) def _auto_label(rects): ratios = [rect.get_height() ...
mit
Event38/MissionPlanner
Lib/distutils/file_util.py
55
8026
"""distutils.file_util Utility functions for operating on single files. """ __revision__ = "$Id$" import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose output in 'copy_file()' _copy_action = {None: 'copying', 'hard': 'hard linking',...
gpl-3.0
thedep2/CouchPotatoServer
libs/tornado/platform/auto.py
139
1599
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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 a...
gpl-3.0
ChenJunor/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/comments/models.py
125
7754
from django.conf import settings from django.contrib.comments.managers import CommentManager from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core import urlresolvers from django.db import models from djan...
apache-2.0
scorpionis/docklet
client/venv/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py
1730
2278
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
bsd-3-clause
Tim1928/DBK-3.4
tools/perf/util/setup.py
4998
1330
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
jtouug/pylibtiff
libtiff/tests/test_tiff_array.py
11
1703
import os import atexit from tempfile import mktemp from numpy import * from libtiff import TIFF from libtiff import TIFFfile, TIFFimage def test_simple_slicing(): for planar_config in [1,2]: for compression in [None, 'lzw']: for itype in [uint8, uint16, uint32, uint64, ...
bsd-3-clause
biocore/qiime2
qiime2/metadata/io.py
1
17428
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
zoyahav/incubator-airflow
tests/ti_deps/deps/test_not_in_retry_period_dep.py
31
2298
# -*- 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
GaZ3ll3/numba
numba/tests/test_dataflow.py
6
5697
from __future__ import print_function import warnings import numba.unittest_support as unittest from numba.compiler import compile_isolated, Flags from numba.utils import PYVERSION from numba import types from .support import TestCase, CompilationCache enable_pyobj_flags = Flags() enable_pyobj_flags.set("enable_pyo...
bsd-2-clause
flyapen/UgFlu
flumotion/configure/configure.py
1
5450
# -*- Mode: Python; test-case-name: flumotion.test.test_configure -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Publi...
gpl-2.0
powerjg/gem5-ci-test
tests/configs/realview64-simple-atomic.py
43
2412
# Copyright (c) 2012 ARM Limited # 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 implementation of the functionality ...
bsd-3-clause
UnrememberMe/pants
tests/python/pants_test/cache/test_caching.py
1
2992
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pant...
apache-2.0
TheTimmy/spack
var/spack/repos/builtin/packages/f90cache/package.py
3
1772
############################################################################## # Copyright (c) 2017, Los Alamos National Security, LLC # Produced at the Los Alamos National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, ...
lgpl-2.1
holmes/intellij-community
python/helpers/docutils/readers/python/__init__.py
51
4338
# $Id: __init__.py 5618 2008-07-28 08:37:32Z strank $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This package contains the Python Source Reader modules. """ __docformat__ = 'reStructuredText' import sys import docutils.readers from docutils.reader...
apache-2.0
CredoReference/edx-platform
lms/djangoapps/courseware/tests/test_microsites.py
8
14619
""" Tests related to the Site Configuration feature """ import pytest from bs4 import BeautifulSoup from contextlib import contextmanager from django.conf import settings from django.urls import reverse from django.test.utils import override_settings from mock import patch from nose.plugins.attrib import attr from six...
agpl-3.0
wxgeo/geophar
wxgeometrie/sympy/simplify/radsimp.py
4
37244
from __future__ import print_function, division from collections import defaultdict from sympy import SYMPY_DEBUG from sympy.core.evaluate import global_evaluate from sympy.core.compatibility import iterable, ordered, default_sort_key from sympy.core import expand_power_base, sympify, Add, S, Mul, Derivative, Pow, s...
gpl-2.0
TrevorLowing/PyGames
pysollib/games/picturegallery.py
2
20065
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- ##---------------------------------------------------------------------------## ## ## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer ## Copyright (C) 2003 Mt. Hood Playing Card Co. ## Copyright (C) 2005-2009 Skomoroh ## ## This program is free ...
gpl-2.0
WillGuan105/django
tests/gis_tests/gis_migrations/migrations/0001_initial.py
269
2465
from django.db import connection, migrations, models from ...models import models as gis_models ops = [ migrations.CreateModel( name='Neighborhood', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.C...
bsd-3-clause
theheros/kbengine
kbe/src/lib/python/Lib/distutils/tests/test_build_clib.py
53
4965
"""Tests for distutils.command.build_clib.""" import unittest import os import sys from test.support import run_unittest from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError from distutils.tests import support from distutils.spawn import find_executable class BuildCLib...
lgpl-3.0
jorgeamu/objective-bvk
atom.py
1
2844
#!/usr/bin/env python # Here's a very rough start to the atom class. from numpy import * class atom(object): def __init__(self, num_id, xdatcar): self.num_id = num_id # Number ID (1-128) self.xdatcar = xdatcar # This is the string with the name of the XDATCAR fil...
gpl-3.0
sss/calibre-at-bzr
src/cherrypy/process/wspbus.py
24
16282
"""An implementation of the Web Site Process Bus. This module is completely standalone, depending only on the stdlib. Web Site Process Bus -------------------- A Bus object is used to contain and manage site-wide behavior: daemonization, HTTP server start/stop, process reload, signal handling, drop privileges, PID f...
gpl-3.0
Jgarcia-IAS/Fidelizacion_odoo
openerp/addons/crm/__init__.py
329
1265
# -*- 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
seoester/bjec
src/bjec/collector.py
1
9733
from abc import ABC, abstractmethod from contextlib import ExitStack from shutil import copyfileobj import os from tempfile import mkstemp from types import TracebackType from typing import Any, BinaryIO, Callable, cast, Dict, Generic, Iterable, List, Optional, Tuple, Type, TypeVar, Union from .params import ParamSet,...
mit
patmcb/odoo
addons/account_budget/account_budget.py
194
9368
# -*- 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
sbg/Mitty
mitty/benchmarking/partition_bams.py
1
7646
""" file0 = A file1 = B file2 = C ABC = present in all partitions abc = absent from all partitions """ import os import time import logging import pysam from mitty.benchmarking.alignmentscore import ri, load_qname_sidecar, parse_qname, score_alignment_error, tag_alignment logger = logging.getLogger(__name__) MAX...
apache-2.0
Elbagoury/odoo
addons/purchase_requisition/__openerp__.py
260
2424
############################################################################## # # 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 Affero General Public L...
agpl-3.0
nirs/vdsm
tests/storage/sd_test.py
2
1260
# # Copyright 2019 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in th...
gpl-2.0
dwcarder/sdn-ix-demo
exabgp-3.4.3/lib/exabgp/test/validation.py
2
12823
# encoding: utf-8 """ validation.py Created by Thomas Mangin on 2013-03-18. Copyright (c) 2009-2013 Exa Networks. All rights reserved. """ __all__ = ["validation", "ValidationError"] FORMAT = 3 DEBUG = False from collections import deque from collections import OrderedDict from exabgp.data import check TYPE=check...
bsd-2-clause
fiwareulpgcmirror/fiware-orion
scripts/pdi-pep8.py
17
47771
#!/usr/bin/python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006 Johann C. Rocholl <johann@rocholl.net> # # 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 Soft...
agpl-3.0
asimshankar/tensorflow
tensorflow/lite/python/convert_saved_model_test.py
9
14427
# Copyright 2018 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
michigraber/scikit-learn
sklearn/metrics/regression.py
175
16953
"""Metrics to assess performance on regression task Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Ma...
bsd-3-clause
marcocaccin/LearningMetaDynamics
MD_unconstrained/md_db0_build.py
1
7472
from __future__ import division, print_function import scipy as sp import scipy.linalg as LA import os from ase import units from ase import Atoms import matplotlib.pyplot as plt from matplotlib.mlab import griddata import pickle as pkl dihedral_atoms_phi = [4,6,8,14] # C(O)-N-C(a)-C(O) dihedral_atoms_psi = [6,8,14,...
gpl-2.0
singingwolfboy/requests-oauthlib
setup.py
2
2048
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import re from setuptools import setup # Get the version version_regex = r'__version__ = ["\']([^"\']*)["\']' with open("requests_oauthlib/__init__.py", "r") as f: text = f.read() match = re.search(version_regex, text) if match: ...
isc
vismartltd/edx-platform
lms/djangoapps/instructor_analytics/tests/test_basic.py
18
18262
""" Tests for instructor.basic """ import json from student.models import CourseEnrollment from django.core.urlresolvers import reverse from mock import patch from student.roles import CourseSalesAdminRole from student.tests.factories import UserFactory, CourseModeFactory from shoppingcart.models import ( CourseRe...
agpl-3.0
raulshepherd/ardupilot-solo
mk/PX4/Tools/genmsg/test/test_genmsg_msg_loader.py
215
29225
# Software License Agreement (BSD License) # # Copyright (c) 2009, Willow Garage, 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...
gpl-3.0
tesb/flask-crystal
venv/Lib/site-packages/setuptools/command/install_lib.py
111
2089
import distutils.command.install_lib as orig import os class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" def run(self): self.build() outfiles = self.install() if outfiles is not None: # always compile, in case we have any e...
apache-2.0
Pink-Silver/PyDoom
MakeZip.py
1
1039
# Copyright (c) 2016, Kate Fox # All rights reserved. # # This file is covered by the 3-clause BSD license. # See the LICENSE file in this program's distribution for details. import zipfile, os.path from os import walk from sys import argv def main (inpath, outpath): inpath = os.path.normpath (inpath) outpat...
bsd-3-clause
kurikuri99/xen_study
tools/pygrub/src/ExtLinuxConf.py
14
6319
# # ExtLinuxConf.py - Simple syslinux config parsing # # Copyright 2010 Citrix Systems Ltd. # # This software may be freely redistributed under the terms of the GNU # general public license. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Softwa...
gpl-2.0
teonlamont/mne-python
mne/viz/tests/test_evoked.py
2
14543
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Cathy Nangini <cnangini@gmail.com> # Mainak Jas <mainak@neuro.hut.fi> #...
bsd-3-clause
chrisndodge/edx-platform
lms/djangoapps/edxnotes/helpers.py
16
15110
""" Helper methods related to EdxNotes. """ import json import logging from json import JSONEncoder from uuid import uuid4 import urlparse from urllib import urlencode import requests from datetime import datetime from dateutil.parser import parse as dateutil_parse from opaque_keys.edx.keys import UsageKey from reques...
agpl-3.0
daily-bruin/meow
meow/scheduler/management/commands/init.py
1
4075
from django.core.management.base import BaseCommand, CommandError from scheduler.models import MeowSetting from django.contrib.auth.models import Group, Permission import os class Command(BaseCommand): help = "Sets default database settings" def set_preference(self, machine_name, human_name, default=""): ...
agpl-3.0
feardax/namebench
nb_third_party/jinja2/utils.py
189
26319
# -*- coding: utf-8 -*- """ jinja2.utils ~~~~~~~~~~~~ Utility functions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import sys import errno try: from thread import allocate_lock except ImportError: from dummy_thread import allocate_lo...
apache-2.0
Akrog/cinder
cinder/tests/test_v6000_iscsi.py
4
28657
# Copyright 2014 Violin Memory, 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 requi...
apache-2.0
worsht/antlr4
runtime/Python2/src/antlr4/Recognizer.py
14
6578
# # [The "BSD license"] # Copyright (c) 2012 Terence Parr # Copyright (c) 2012 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redis...
bsd-3-clause
cristicbz/rust-doom
scripts/tables.py
1
8473
from __future__ import print_function EXTENDED = 'Ext' TRIGGERS = { 'P': '"Push"', 'S': '"Switch"', 'W': '"WalkOver"', 'G': '"Gun"', } SPEEDS = { '----': 0, 'Slow': 8, 'Normal': 16, 'Fast': 32, 'Turbo': 64, 'Inst': 16384, } LOCKS = { 'No': None, 'Blue': 0, 'Red': 1...
apache-2.0
jamesblunt/psutil
examples/netstat.py
15
1916
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ A clone of 'netstat -antp' on Linux. $ python examples/netstat.py Proto Local address Remote address Status PID ...
bsd-3-clause
rouault/Quantum-GIS
python/plugins/processing/algs/gdal/retile.py
2
10483
# -*- coding: utf-8 -*- """ *************************************************************************** retile.py --------------------- Date : January 2016 Copyright : (C) 2016 by Médéric Ribreux Email : mederic dot ribreux at medspx dot fr ****************...
gpl-2.0
supertom/libcloud
libcloud/dns/drivers/hostvirtual.py
25
9402
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
nitzmahone/netmiko
examples/async.py
11
2483
#!/usr/bin/env python2.7 """Example of asynchronously running "show version". async(): decorator to make further functions asynchronous command_runner(): creates a connection and runs an arbitrary command main(): entry point, runs the command_runner """ import netmiko from inspect import getmodule from multiprocessing...
mit
xsm110/Apache-Beam
sdks/python/apache_beam/examples/complete/tfidf_test.py
9
3162
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
tacrow/tacrow
node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
1869
1247
# Copyright 2014 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. """A clone of the default copy.deepcopy that doesn't handle cyclic structures or complex types except for dicts and lists. This is because gyp copies so large structur...
mit
pombredanne/reason
manage.py
2
2073
from reason import app, db from reason.models import User, Report from reason import views from flask.ext.script import Manager, prompt_bool, Server from flask.ext.migrate import Migrate, MigrateCommand import os, subprocess from reason.vfeed.vfeedQuickUpdate import now as updatevFeed import tempfile import shutil fro...
mit
manterd/myPhyloDB
functions/queues/queue.py
1
19349
from django.http import HttpResponse from Queue import Queue import json import multiprocessing as mp from time import sleep, time import gc import datetime import config.local_cfg from django.contrib.auth.models import User from database.models import UserProfile import os import shutil import functions from function...
gpl-3.0
zerc/django
tests/utils_tests/test_lazyobject.py
268
8629
from __future__ import unicode_literals import copy import pickle import sys from unittest import TestCase from django.utils import six from django.utils.functional import LazyObject, SimpleLazyObject, empty class Foo(object): """ A simple class with just one attribute. """ foo = 'bar' def __eq...
bsd-3-clause
Nu3001/external_chromium_org
base/PRESUBMIT.py
58
1853
# 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. """Chromium presubmit script for src/base. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details on the presubmit...
bsd-3-clause
ElementsProject/elements
test/bitcoin_functional/functional/wallet_import_with_label.py
17
4884
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the behavior of RPC importprivkey on set and unset labels of addresses. It tests different cases in wh...
mit
Pinecast/pinecast
accounts/migrations/0016_usersuggestion_usersuggestioncomment_usersuggestionvote.py
3
2333
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-17 18:28 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependenc...
apache-2.0
bgris/ODL_bgris
lib/python3.5/site-packages/docutils/parsers/rst/languages/he.py
52
3624
# Author: Meir Kriheli # Id: $Id: he.py 7119 2011-09-02 13:00:23Z milde $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each language: ...
gpl-3.0
Annotald/annotald
nltk2-patched/nltk/inference/api.py
12
19310
# Natural Language Toolkit: Classifier Interface # # Author: Ewan Klein <ewan@inf.ed.ac.uk> # Dan Garrette <dhgarrette@gmail.com> # # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Interfaces and base classes for theorem provers and model builders. ``Prover`` is a standard interfac...
gpl-3.0
spacewalkproject/spacewalk
backend/common/rhn_mpm.py
10
9269
# # Copyright (c) 2008--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
mrachinskiy/blender-addon-jewelcraft
lib/unit.py
1
1790
# ##### BEGIN GPL LICENSE BLOCK ##### # # JewelCraft jewelry design toolkit for Blender. # Copyright (C) 2015-2019 Mikhail Rachinskiy # # 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...
mit
landism/pants
tests/python/pants_test/backend/codegen/antlr/python/test_antlr_py_gen.py
7
2181
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from textwrap import...
apache-2.0
xsynergy510x/android_external_chromium_org
chrome/common/extensions/docs/server2/directory_zipper_test.py
98
1867
#!/usr/bin/env python # 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 unittest from cStringIO import StringIO from zipfile import ZipFile from compiled_file_system import CompiledFileSystem from di...
bsd-3-clause
blazewicz/micropython
tests/basics/set_binop.py
25
1807
# test set binary operations sets = [set(), {1}, {1, 2}, {1, 2, 3}, {2, 3}, {2, 3, 5}, {5}, {7}] for s in sets: for t in sets: print(sorted(s), '|', sorted(t), '=', sorted(s | t)) print(sorted(s), '^', sorted(t), '=', sorted(s ^ t)) print(sorted(s), '&', sorted(t), '=', sorted(s & t)) ...
mit
jalexvig/tensorflow
tensorflow/contrib/distribute/python/combinations.py
8
14139
# Copyright 2018 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
HackingHabits/PersonalPasswordManager
packages/Flask/flask/wrappers.py
50
5607
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.util...
mit
kewu1992/test-infra
metrics/influxdb_test.py
7
4440
#!/usr/bin/env python # Copyright 2017 The Kubernetes 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 appli...
apache-2.0
tiagofrepereira2012/tensorflow
tensorflow/examples/tutorials/mnist/mnist_softmax.py
73
2742
# 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
gg7/diamond
src/collectors/memcached_slab/memcached_slab.py
2
3489
""" Collect memcached slab stats #### Example Configuration [[MemcachedSlabCollector]] enabled = True host = localhost # optional port = 11211 # optional """ from collections import defaultdict import socket import diamond.collector from diamond.metric import Metric def parse_slab_stats(slab_stats): """Conv...
mit
hackerkid/zulip
zerver/migrations/0209_user_profile_no_empty_password.py
6
11109
# Generated by Django 1.11.24 on 2019-10-16 22:48 from typing import Any, Set, Union import orjson from django.conf import settings from django.contrib.auth.hashers import check_password, make_password from django.db import migrations from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.d...
apache-2.0
TanguyPatte/phantomjs-packaging
src/breakpad/src/tools/gyp/test/configurations/inheritance/gyptest-inheritance.py
430
1047
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies build of an executable in three different configurations. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('configur...
bsd-3-clause
yephper/django
django/core/management/commands/createcachetable.py
1
4508
from django.conf import settings from django.core.cache import caches from django.core.cache.backends.db import BaseDatabaseCache from django.core.management.base import BaseCommand, CommandError from django.db import ( DEFAULT_DB_ALIAS, connections, models, router, transaction, ) from django.db.utils import...
bsd-3-clause
GaetanCambier/CouchPotatoServer
couchpotato/core/media/_base/searcher/main.py
62
8876
import datetime import re from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import simplifyString from couchpotato.core.helpers.variable import splitString, removeEmpty, removeDuplicate from couchpotato.core.logger import CPLog from cou...
gpl-3.0
leki75/ansible
lib/ansible/modules/network/avi/avi_controllerproperties.py
19
13783
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.2 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
Buggaarde/youtube-dl
youtube_dl/extractor/wimp.py
37
1647
from __future__ import unicode_literals from .common import InfoExtractor from .youtube import YoutubeIE class WimpIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?wimp\.com/(?P<id>[^/]+)/' _TESTS = [{ 'url': 'http://www.wimp.com/maruexhausted/', 'md5': 'ee21217ffd66d058e8b16be340b74883', ...
unlicense
CyanideL/android_kernel_htc_msm8974
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
javierblasco/tensorflow
tensorflow/python/ops/constant_op.py
2
6108
"""## Constant Value Tensors TensorFlow provides several operations that you can use to generate constants. @@zeros @@zeros_like @@ones @@ones_like @@fill @@constant ## Sequences @@linspace @@range ## Random Tensors TensorFlow has several ops that create random tensors with different distributions. The rando...
apache-2.0
marcoantoniooliveira/labweb
oscar/lib/python2.7/site-packages/requests/packages/charade/langhebrewmodel.py
183
11519
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Re...
bsd-3-clause
akretion/sale-workflow
sale_quotation_number/model/sale_order.py
34
1765
# # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
r3tard/BartusBot
lib/Crypto/Cipher/ARC4.py
123
4266
# -*- coding: utf-8 -*- # # Cipher/ARC4.py : ARC4 # # =================================================================== # 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 granted a worldwide, perpetual, royalty-free, #...
apache-2.0
cjones/madcow
contrib/django-memebot/gruntle/memebot/management/commands/bounce.py
2
2700
"""Bounce last published links so they can be rescanned. Drops metadata.""" from optparse import make_option import sys from django.core.management.base import NoArgsCommand, CommandError from django.conf import settings from gruntle.memebot.models import Link MIN_LINKS = 25 DATEFMT = '%Y-%m-%d %H:%M:%S' def get_max...
gpl-3.0
hamzehd/edx-platform
common/djangoapps/student/management/commands/set_staff.py
182
1442
from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError import re class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--unset', action='store_true', ...
agpl-3.0