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
s-hertel/ansible
lib/ansible/modules/wait_for_connection.py
31
3017
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.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 DOCUMENTATION = r''' --- module...
gpl-3.0
Chilledheart/chromium
tools/telemetry/third_party/gsutilz/third_party/boto/boto/sns/__init__.py
131
2117
# Copyright (c) 2010-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # 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, includin...
bsd-3-clause
Zanzibar82/plugin.video.pelisalacarta_ui.pureita
core/unpackerjs3.py
4
3745
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Descifra el empaquetado javascript PACK de Dean Edwards # No está bien probado, así que no garantizo que funcione aunque en los casos de este plugin va muy bien :) # http://blog.tvalacarta.info/plugin-x...
gpl-3.0
encukou/freeipa
ipatests/test_cmdline/test_help.py
4
5658
# Authors: Petr Viktorin <pviktori@redhat.com> # # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information # # 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 vers...
gpl-3.0
sudheesh001/oh-mainline
vendor/packages/twisted/twisted/web/iweb.py
18
14513
# -*- test-case-name: twisted.web.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Interface definitions for L{twisted.web}. @var UNKNOWN_LENGTH: An opaque object which may be used as the value of L{IBodyProducer.length} to indicate that the length of the entity body is not...
agpl-3.0
qrkourier/ansible
lib/ansible/modules/cloud/ovirt/ovirt_vmpools.py
75
7594
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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 #...
gpl-3.0
yarikoptic/pystatsmodels
statsmodels/graphics/tests/test_functional.py
3
2815
import numpy as np from numpy.testing import dec, assert_equal, assert_almost_equal from statsmodels.graphics.functional import \ banddepth, fboxplot, rainbowplot try: import matplotlib.pyplot as plt import matplotlib if matplotlib.__version__ < '1': raise have_matplotlib = True e...
bsd-3-clause
pombredanne/pushmanager
core/mail.py
6
3118
# -*- coding: utf-8 -*- import email.mime.text from Queue import Queue, Empty import smtplib from threading import Thread from core.settings import Settings class MailQueue(object): message_queue = Queue() worker_thread = None smtp = None @classmethod def start_worker(cls): if cls.worker...
apache-2.0
neocogent/electrum
setup.py
1
3017
#!/usr/bin/env python3 # python setup.py sdist --format=zip,gztar import os import sys import platform import importlib.util import argparse import subprocess from setuptools import setup, find_packages from setuptools.command.install import install MIN_PYTHON_VERSION = "3.6.1" _min_python_version_tuple = tuple(map...
mit
mmnelemane/nova
nova/virt/firewall.py
56
21942
# Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2011 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
apache-2.0
amgowano/oppia
core/tests/performance_tests/profile_page_test.py
16
1625
# Copyright 2016 The Oppia 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
qingqing01/models
fluid/adversarial/advbox/attacks/base.py
4
2226
""" The base model of the model. """ import logging from abc import ABCMeta from abc import abstractmethod import numpy as np class Attack(object): """ Abstract base class for adversarial attacks. `Attack` represent an adversarial attack which search an adversarial example. subclass should implement ...
apache-2.0
patrickcurl/ztruck
dj/lib/python2.7/site-packages/pip/req/req_set.py
30
26547
from __future__ import absolute_import from collections import defaultdict import functools import itertools import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.download import (url_to_path, unpack_url) from pip.exceptions import (InstallationError, BestVersionAlr...
apache-2.0
krishnazure/Flask
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/jinja2/sandbox.py
637
13445
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
apache-2.0
moble/sympy
sympy/concrete/tests/test_products.py
36
11612
from sympy import (symbols, Symbol, product, factorial, rf, sqrt, cos, Function, Product, Rational, Sum, oo, exp, log, S) from sympy.utilities.pytest import raises from sympy import simplify a, k, n, m, x = symbols('a,k,n,m,x', integer=True) f = Function('f') def test_karr_convention(): # Test...
bsd-3-clause
esthermm/odoomrp-wip
product_variants_no_automatic_creation/tests/test_product_variants.py
10
4833
# -*- coding: utf-8 -*- # © 2016 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp.tests.common import TransactionCase class TestProductVariant(TransactionCase): def setUp(self): super(TestProductVariant, self).setUp() self.tmpl_model = s...
agpl-3.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/pandas/core/reshape/merge.py
3
53839
""" SQL-style merge routines """ import copy import warnings import string import numpy as np from pandas.compat import range, lzip, zip, map, filter import pandas.compat as compat from pandas import (Categorical, Series, DataFrame, Index, MultiIndex, Timedelta) from pandas.core.frame import _mer...
mit
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/template/base.py
37
52380
""" This is the Django template system. How it works: The Lexer.tokenize() function converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). The Parser() class takes a list ...
mit
PawarPawan/h2o-v3
h2o-py/tests/testdir_algos/gbm/pyunit_weightsGBM.py
2
6140
import sys sys.path.insert(1, "../../../") import h2o import random import copy def weights_check(ip,port): def check_same(data1, data2, min_rows_scale): gbm1_regression = h2o.gbm(x=data1[["displacement", "power", "weight", "acceleration", "year"]], y="economy",...
apache-2.0
legacysurvey/legacypipe
py/scripts/dr4/format_headers.py
2
18171
from __future__ import print_function import sys import os import numpy as np from glob import glob import astropy;print(astropy) from astropy.io import fits from astrometry.util.fits import fits_table, merge_tables # sha1sums # nohup bash -c 'for num in `cat coadd_match_ep.txt|awk '"'"'{print $1}'"'"'`; do echo $num...
bsd-3-clause
androidarmv6/android_external_chromium_org
chrome/browser/resources/test_presubmit.py
61
19703
#!/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. """Unit tests for Web Development Style Guide checker.""" import os import re import sys import unittest test_dir = os.path.dirna...
bsd-3-clause
mancoast/CPythonPyc_test
fail/330_test_abc.py
5
14482
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for abc.py.""" import unittest from test import support import abc from inspect import isabstract class TestLegacyAPI(unittest.TestCase): def test_abstractproperty_basics(self): @abc.abstr...
gpl-3.0
ryfeus/lambda-packs
Keras_tensorflow/source/tensorflow/contrib/specs/python/specs_test.py
22
9621
# 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 applicable ...
mit
mrquim/mrquimrepo
plugin.video.playlistLoader/resources/lib/chardet/__init__.py
745
1295
######################## BEGIN LICENSE BLOCK ######################## # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ve...
gpl-2.0
feroda/django
django/contrib/gis/db/backends/oracle/schema.py
608
4050
from django.contrib.gis.db.models.fields import GeometryField from django.db.backends.oracle.schema import DatabaseSchemaEditor from django.db.backends.utils import truncate_name class OracleGISSchemaEditor(DatabaseSchemaEditor): sql_add_geometry_metadata = (""" INSERT INTO USER_SDO_GEOM_METADATA ...
bsd-3-clause
0k/OpenUpgrade
addons/auth_ldap/users_ldap.py
6
10715
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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 Publ...
agpl-3.0
M4rtinK/tsubame
core/platform/base_platform_module.py
1
8584
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Base class for Tsubame platform modules. #---------------------------------------------------------------------------- # Copyright 2017, Martin Kolman # # This program is free software: you can redistribute it and/or...
gpl-3.0
jralls/gramps
gramps/plugins/sidebar/dropdownsidebar.py
10
8043
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2005-2007 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2009 Benny Malengier # Copyright (C) 2010 Nick Hall # Copyright (C) 2011 Tim G L Lyons # # This program is free software; you can redistribute...
gpl-2.0
jashandeep-sohi/aiohttp
tests/test_py35/test_streams_35.py
3
2188
import pytest from aiohttp import streams DATA = b'line1\nline2\nline3\n' def chunkify(seq, n): for i in range(0, len(seq), n): yield seq[i:i+n] def create_stream(loop): stream = streams.StreamReader(loop=loop) stream.feed_data(DATA) stream.feed_eof() return stream @pytest.mark.run_...
apache-2.0
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/dom.py
559
8469
from __future__ import absolute_import, division, unicode_literals from xml.dom import minidom, Node import weakref from . import _base from .. import constants from ..constants import namespaces from ..utils import moduleFactoryFactory def getDomBuilder(DomImplementation): Dom = DomImplementation class A...
agpl-3.0
Medigate/cutiuta-server
cutiuta-server/env/lib/python3.4/site-packages/django/views/generic/base.py
115
7583
from __future__ import unicode_literals import logging from functools import update_wrapper from django import http from django.core.exceptions import ImproperlyConfigured from django.template.response import TemplateResponse from django.urls import NoReverseMatch, reverse from django.utils import six from django.uti...
gpl-3.0
leominov/fabric-bolt
fabric_bolt/accounts/admin.py
10
2323
from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.utils.translation import ugettext_lazy as _ from authtools.admin import UserAdmin from fabric_bolt.accounts.forms import UserChangeForm, UserCreationForm class ...
mit
redhatrises/freeipa
ipaclient/remote_plugins/2_164/automount.py
16
35304
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...
gpl-3.0
SESoS/SIMVA-SoS
src/new main/Integrated/prototype/Verifier.py
2
4222
import random from datetime import datetime random.seed(datetime.now()) class Verifier(object): def __init__(self, checker): self.propertyChecker = checker def verify(self, simulationLogs, verificationProperty): check = True for simulationLog in simulationLogs: if not self...
apache-2.0
Ronak6892/servo
tests/wpt/harness/wptrunner/wptmanifest/tests/test_serializer.py
131
4691
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import unittest from cStringIO import StringIO from .. import parser, serializer class TokenizerTest(unittest.TestCa...
mpl-2.0
thefinn93/CouchPotatoServer
libs/werkzeug/contrib/profiler.py
91
3969
# -*- coding: utf-8 -*- """ werkzeug.contrib.profiler ~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides a simple WSGI profiler middleware for finding bottlenecks in web application. It uses the :mod:`profile` or :mod:`cProfile` module to do the profiling and writes the stats to the stream provide...
gpl-3.0
Tearund/stories
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
2779
1665
# Copyright (c) 2011 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. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
mit
defionscode/ansible-modules-core
windows/win_reboot.py
61
2471
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
wkfwkf/statsmodels
statsmodels/tsa/x13.py
7
23281
""" Run x12/x13-arima specs in a subprocess from Python and curry results back into python. Notes ----- Many of the functions are called x12. However, they are also intended to work for x13. If this is not the case, it's a bug. """ from __future__ import print_function import os import subprocess import tempfile impor...
bsd-3-clause
kristi/Lyx
development/tools/generate_symbols_list.py
3
3004
#!/usr/bin/python import sys,string,re,os def get_code(code, font): if code < 10: return code+161 elif code < 32: return code+163 else: return code font_names = {} symbols = {} xsymbols = {} ignore_list = ["not", "braceld", "bracerd", "bracelu", "braceru", "lmoustache", "rmoustache", "lgroup",...
gpl-2.0
ESS-LLP/erpnext-medical
erpnext/patches/v10_0/update_warehouse_address_details.py
17
1260
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): warehouse = frappe.db.sql("""select name, email_id, phone_no, mobile_no, address_line_1, address_line_2, city, state, pin from `tabWarehouse` ...
gpl-3.0
Laurawly/tvm-1
tests/python/contrib/test_random.py
4
5099
# 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 u...
apache-2.0
TeamTwisted/external_chromium_org
chrome/common/extensions/docs/server2/content_provider.py
41
8409
# 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 mimetypes import posixpath import traceback from compiled_file_system import SingleFile from directory_zipper import DirectoryZipper from docs_server...
bsd-3-clause
sgraham/nope
third_party/opus/convert_rtcd_assembler.py
89
1531
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Script for converting celt_pitch_xcorr_arm.s -> celt_pitch_xcorr_arm.S # using the arm2gnu.pl script. import os import sys USAGE =...
bsd-3-clause
RockySteveJobs/python-for-android
python3-alpha/python3-src/Lib/logging/config.py
45
34770
# Copyright 2001-2010 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
apache-2.0
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/site-packages/cryptography-0.5.2-py2.7-linux-x86_64.egg/cryptography/hazmat/bindings/commoncrypto/binding.py
2
1658
# 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
dakoner/keras-molecules
interpolate.py
4
3090
from __future__ import print_function import h5py import numpy import os import argparse import sample from molecules.model import MoleculeVAE from molecules.utils import decode_smiles_from_indexes from molecules.utils import one_hot_array, one_hot_index SOURCE = 'Cc1ccnc(c1)NC(=O)Cc2cccc3c2cccc3' DEST = 'c1cc(cc(c1)...
mit
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/astroid/tests/unittest_builder.py
2
28456
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
agpl-3.0
julian-seward1/servo
tests/wpt/web-platform-tests/tools/pytest/testing/test_tmpdir.py
173
6017
import sys import py import pytest from _pytest.tmpdir import tmpdir def test_funcarg(testdir): testdir.makepyfile(""" def pytest_generate_tests(metafunc): metafunc.addcall(id='a') metafunc.addcall(id='b') def test_func(tmpdir): pass """) from _pytes...
mpl-2.0
quanvm009/codev7
openerp/addons/delivery/__openerp__.py
18
1975
# -*- 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
JazzeYoung/VeryDeepAutoEncoder
theano/tensor/tests/test_extra_ops.py
1
36192
from __future__ import absolute_import, print_function, division import numpy as np import numpy import theano from theano.tests import unittest_tools as utt from theano.tensor.extra_ops import (SearchsortedOp, searchsorted, CumsumOp, cumsum, CumprodOp, cumprod, ...
bsd-3-clause
40223101/w17test
static/Brython3.1.0-20150301-090019/Lib/sys.py
109
4959
# hack to return special attributes from _sys import * from javascript import JSObject has_local_storage=__BRYTHON__.has_local_storage has_session_storage = __BRYTHON__.has_session_storage has_json=__BRYTHON__.has_json argv = ['__main__'] base_exec_prefix = __BRYTHON__.brython_path base_prefix = __BRYTHON__.brython...
gpl-3.0
ToBeReplaced/ansible-modules-extras
packaging/os/pkgng.py
60
11130
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, bleader # Written by bleader <bleader@ratonland.org> # Based on pkgin module written by Shaun Zinck <shaun.zinck at gmail.com> # that was based on pacman module written by Afterburn <http://github.com/afterburn> # that was based on apt module written by Matthew W...
gpl-3.0
NickDaly/GemRB-FixConfig-Branch
gemrb/GUIScripts/bg2/GUIOPT8.py
5
5789
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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 versi...
gpl-2.0
sfcl/ancon
index/forms/tr_to_firm.py
2
4712
# -*- coding:utf-8 -*- from django import forms from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from index.models import FirmTonerRefill from docs.models import SCDoc class TransfeToFirm(forms.Form): numbers = forms.CharField(widget=forms.HiddenInput(),...
gpl-2.0
Salat-Cx65/python-for-android
python3-alpha/python3-src/Lib/asyncore.py
46
21009
# -*- Mode: Python -*- # Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission to use, copy, modify,...
apache-2.0
avlach/univbris-ocf
vt_manager/src/python/vt_manager/communication/sfa/util/callids.py
2
2280
#!/usr/bin/python import threading import time #from vt_manager.communication.sfa.util.sfalogging import logger """ Callids: a simple mechanism to remember the call ids served so fas memory-only for now - thread-safe implemented as a (singleton) hash 'callid'->timestamp """ debug=False class _call_ids_impl (dict):...
bsd-3-clause
openweave/openweave-core
src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_48.py
1
3501
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, 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/lic...
apache-2.0
Lh4cKg/sl4a
python/src/Lib/ctypes/test/test_macholib.py
53
1601
import os import sys import unittest # Bob Ippolito: """ Ok.. the code to find the filename for __getattr__ should look something like: import os from macholib.dyld import dyld_find def find_lib(name): possible = ['lib'+name+'.dylib', name+'.dylib', name+'.framework/'+name] for dylib in possible: ...
apache-2.0
israeltobias/DownMedia
youtube-dl/youtube_dl/extractor/videomega.py
47
1987
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( decode_packed_codes, sanitized_Request, ) class VideoMegaIE(InfoExtractor): _VALID_URL = r'(?:videomega:|https?://(?:www\.)?videomega\.tv/(?:(?:view|iframe|cdn)\.php)?\?ref=)(?P<id>[...
gpl-3.0
Deepakkothandan/ansible
lib/ansible/modules/network/iosxr/iosxr_facts.py
27
12721
#!/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
bl4ckic3/binnavi
src/main/java/com/google/security/zynamics/binnavi/scripts/mono/sample/sample.py
70
6982
""" Copyright 2014 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 agr...
apache-2.0
richardtrip/noteII
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
gpl-2.0
stanlyxiang/incubator-hawq
tools/bin/pythonSrc/pexpect-4.2/pexpect/run.py
49
6632
import sys import types from .exceptions import EOF, TIMEOUT from .pty_spawn import spawn def run(command, timeout=30, withexitstatus=False, events=None, extra_args=None, logfile=None, cwd=None, env=None, **kwargs): ''' This function runs the given command; waits for it to finish; then returns al...
apache-2.0
anryko/ansible
lib/ansible/modules/cloud/misc/rhevm.py
21
51254
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Timothy Vandenbrande <timothy.vandenbrande@gmail.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 = ...
gpl-3.0
live-clones/dolfin-adjoint
timestepping/python/timestepping/pre_assembled_equations.py
1
21818
#!/usr/bin/env python2 # Copyright (C) 2011-2012 by Imperial College London # Copyright (C) 2013 University of Oxford # Copyright (C) 2014-2016 University of Edinburgh # # 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 ...
lgpl-3.0
trnewman/VT-USRP-daughterboard-drivers_python
gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py
1
3066
#!/bin/env python # -*- python -*- # # Copyright 2003 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
gpl-3.0
Hiestaa/3D-Lsystem
Vector.py
1
1792
class Vector: """represente un vecteur 3d""" def __init__(self, arg = (0, 0, 0)): self.x = float(arg[0]) self.y = float(arg[1]) self.z = float(arg[2]) def set(self, val): if isinstance(val, self.__class__): self.x = val.x self.y = val.y self.z = val.z else: self.x = val[0] self.y = val[1] ...
mit
SymbiFlow/prjxray
minitests/litex/uart_ddr/arty/scripts/arty.py
1
4274
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC # This file is Copyright (c) 2015-20...
isc
chenyu105/linux
tools/perf/scripts/python/failed-syscalls-by-pid.py
1996
2233
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
barracuda7/android_kernel_samsung_exynos5420
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
gvlproject/tools-iuc
tools/scikit-bio/scikit_bio_diversity_beta_diversity.py
9
3774
#!/usr/bin/env python # Reports a beta diversity matrix for tabular input file # using scikit-bio # Daniel Blankenberg import codecs import optparse import sys from skbio import TreeNode from skbio.diversity import beta_diversity __VERSION__ = "0.0.1" DELIMITER = '\t' NEEDS_TREE = [ 'unweighted_unifrac', 'weight...
mit
unicri/edx-platform
openedx/core/djangoapps/user_api/accounts/image_helpers.py
40
5281
""" Helper functions for the accounts API. """ import hashlib from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.files.storage import get_storage_class from staticfiles.storage import staticfiles_storage from microsite_configuration import microsite from student.m...
agpl-3.0
sodafree/backend
django/contrib/auth/management/__init__.py
62
4659
""" Creates permissions for all installed apps that need permissions. """ import getpass import locale import unicodedata from django.contrib.auth import models as auth_app from django.db.models import get_models, signals from django.contrib.auth.models import User def _get_permission_codename(action, opts): retu...
bsd-3-clause
windmill/windmill
windmill/authoring/unit.py
2
2026
# Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 req...
apache-2.0
kapil1garg/eecs338-chris-jones
show_query.py
1
3440
import json import elastic from operator import itemgetter from default_query import DefaultQuery class ShowQuery(DefaultQuery): """ Handles ES queries related to shows """ def __init__(self): DefaultQuery.__init__(self) def generate_response_best_show(self, query, annotated_query): ...
mit
jakevdp/altair
altair/utils/server.py
1
4035
""" A Simple server used to show altair graphics from a prompt or script. This is adapted from the mpld3 package; see https://github.com/mpld3/mpld3/blob/master/mpld3/_server.py """ import sys import threading import webbrowser import socket import itertools import random from ._py3k_compat import server, IO JUPYTER_...
bsd-3-clause
Jens-G/thrift
lib/py/src/transport/TZlibTransport.py
47
8778
# # 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 u...
apache-2.0
CWDoherty/Baseball
Scripts/hashtags.py
1
1999
''' Copyright (c) 2015 Chris Doherty, Oliver Nabavian 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 without limitation the rights to use, copy, modify, merge, publi...
mit
hectoruelo/scrapy
scrapy/loader/processors.py
145
2850
""" This module provides some commonly used processors for Item Loaders. See documentation in docs/topics/loaders.rst """ from scrapy.utils.misc import arg_to_iter from scrapy.utils.datatypes import MergeDict from .common import wrap_loader_context class MapCompose(object): def __init__(self, *functions, **def...
bsd-3-clause
pombredanne/pants
src/python/pants/java/jar/jar_dependency.py
4
7368
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import url...
apache-2.0
mzueger/linux-colibri-t30
tools/perf/util/setup.py
560
1379
#!/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
roderickvd/nzbToMedia
libs/beets/util/bluelet.py
17
19951
"""Extremely simple pure-Python implementation of coroutine-style asynchronous socket I/O. Inspired by, but inferior to, Eventlet. Bluelet can also be thought of as a less-terrible replacement for asyncore. Bluelet: easy concurrency without all the messy parallelism. """ import socket import select import sys import t...
gpl-3.0
andyrimmer/Platypus
scripts/computeIndelRatio.py
2
1493
""" This script produces summary plots and tables of the Platypus SNP and indel calls, and comparison plots of Platypus calls with the validated 1000 genomes calls. """ from __future__ import division from math import sqrt,pow,log,exp,pi,log10 import sys import gzip ##################################################...
gpl-3.0
thaumos/ansible
lib/ansible/modules/network/fortimanager/fmgr_fwobj_address.py
38
24230
#!/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
betoesquivel/CIE
flask/lib/python2.7/site-packages/sqlalchemy/orm/base.py
32
13181
# orm/base.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Constants and rudimental functions used throughout the ORM. """ from .. import util...
mit
AmberJBlue/aima-python
submissions/Hess/vacuum2.py
18
1142
import agents as ag def HW2Agent() -> object: def program(percept): bump, status = percept if status == 'Dirty': action = 'Suck' else: lastBump, lastStatus = program.oldPercepts[-1] lastAction = program.oldActions[-1] if lastAction == 'Suck'...
mit
hydai/closure-linter
setup.py
12
1324
#!/usr/bin/env python # # Copyright 2010 The Closure Linter 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 #...
apache-2.0
karesansui/karesansui
karesansui/gadget/hostby1staticroute.py
1
6419
# -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2009-2012 HDE, Inc. # # 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 without lim...
mit
codesparkle/youtube-dl
youtube_dl/extractor/litv.py
5
6252
# coding: utf-8 from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, smuggle_url, unsmuggle_url, ) class LiTVIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?litv\.tv/(?:vod|promo)/[^/]+/(?:content\.do)?\?.*?...
unlicense
dlu-ch/dlb
test/dlb_contrib/test_git.py
1
21925
# SPDX-License-Identifier: LGPL-3.0-or-later # dlb - a Pythonic build tool # Copyright (C) 2020 Daniel Lutz <dlu-ch@users.noreply.github.com> import testenv # also sets up module search paths import dlb.di import dlb.fs import dlb.ex import dlb_contrib.generic import dlb_contrib.git import dlb_contrib.sh import os.pa...
gpl-3.0
t-tran/libcloud
libcloud/test/common/test_google.py
11
15804
# 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
MarkWaldron/Challenges
Programs/02-99-Bottles-of-Beer/solutions/askl56-bottles-of-beer.py
2
1028
ones = ( '', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine' ) prefixes = ('thir', 'four', 'fif', 'six', 'seven', 'eigh', 'nine') tens = ['', '', 'twenty' ] teens = ['ten', 'eleven', 'twelve'] for prefix in prefixes: tens.append(prefix + 'ty') teens.append(prefix +'teen') tens[4] = 'forty...
gpl-2.0
ArchangelX360/EnvironmentalEventsDetector
computation/imagefetcher/imagefetcher/fetcher.py
2
12815
#!/usr/bin/env python2 """Image fetcher, reaching the Google Earth Engine to get images from it.""" import ee import requests import time import threading from collections import deque from datetime import datetime from utils import Error # We cannot use a flag here, because of how the application is designed. DEF...
mit
cmvelo/ansible
lib/ansible/executor/task_queue_manager.py
3
14009
# (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
jonesgithub/zulip
zerver/lib/email_mirror.py
113
10159
from __future__ import absolute_import import logging import re from email.header import decode_header from django.conf import settings from zerver.lib.actions import decode_email_address, internal_send_message from zerver.lib.notifications import convert_html_to_markdown from zerver.lib.redis_utils import get_redi...
apache-2.0
LCOGT/whatsup
whatsup/urls.py
1
1040
""" WhatsUP: astronomical object suggestions for Las Cumbres Observatory Global Telescope Network Copyright (C) 2014-2015 LCOGT urls.py This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version...
gpl-3.0
Dhivyap/ansible
lib/ansible/plugins/doc_fragments/k8s_resource_options.py
40
1295
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Red Hat | Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Options for providing an object configuration class ModuleDocFragment(object): DOCUMENTATION = r''' options: resource_definition: description: ...
gpl-3.0
IOArmory/quarterbackpython
lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py
1777
3764
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
mit
sowravi/sp17-i524
project/S17-IO-3017/code/projectearth/kmeansplot.py
14
3018
import requests import time import dblayer import plotly import plotly.graph_objs as go import pandas as pd import numpy as np import random from sklearn.cluster import KMeans import testfile NUM_CLUSTER = 3 def generate_color(): color = '#{:02x}{:02x}{:02x}'.format(*map(lambda x: random.randint(0, 255), rang...
apache-2.0