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
chaluemwut/fbserver
venv/lib/python2.7/site-packages/numpy/random/tests/test_random.py
30
31114
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_raises, assert_equal, assert_warns) from numpy import random from numpy.compat import asbytes import sys class TestSeed(TestCase): def test_sc...
apache-2.0
bcoca/ansible
lib/ansible/plugins/lookup/template.py
15
6037
# Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2012-17, 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 DOCUMENTATION = """ name: ...
gpl-3.0
jbadson/render_controller
python/test/test_controller.py
1
25532
#!/usr/bin/env python3 import pytest from unittest import mock from importlib import reload import rendercontroller.controller from rendercontroller.exceptions import ( JobNotFoundError, JobStatusError, NodeNotFoundError, ) config_test_dict = { "string_val": "val1", "int_val": 2, "float_val":...
gpl-3.0
SerhiiStets/Voice-assistant
friday.py
1
3098
#!/usr/bin/env python3 # Requires Pygame, gtts, pyttsx # For windows: Speech Recognition, PyAudio import os.path import random import webbrowser import socket import pyttsx import logging import speech_recognition as sr from sys import platform from time import sleep, strftime from pygame import mixer, time from gtts...
mit
bev-a-tron/pledgeservice
testlib/webob/request.py
30
59995
import binascii import cgi import io import os import re import sys import tempfile import mimetypes try: import simplejson as json except ImportError: import json import warnings from webob.acceptparse import ( AcceptLanguage, AcceptCharset, MIMEAccept, MIMENilAccept, NoAccept, accept_...
agpl-3.0
Exa-Networks/exaproxy
lib/exaproxy/reactor/client/passthrough.py
2
6224
# encoding: utf-8 """ server.py Created by David Farrar on 2011-11-30. Copyright (c) 2011-2013 Exa Networks. All rights reserved. """ import socket import errno from exaproxy.network.functions import isipv4 from exaproxy.network.errno_list import errno_block from exaproxy.util.proxy import ProxyProtocol class P...
bsd-2-clause
louietsai/python-for-android
python-build/python-libs/gdata/src/atom/core.py
137
20292
#!/usr/bin/env python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
cloudera/cm_api
python/src/cm_api/endpoints/cms.py
2
20364
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
apache-2.0
ausmeyer/hiv_structural_determinants-paper-now
data/matrix/matrix_structure/distances.py
1
1379
import numpy as np from Bio.PDB import * def calc_distances_aas(model): count = 1 sites = [] for a in model.get_residues(): if a.get_resname() == 'SIA': continue distances = [] for b in model.get_residues(): if b.get_resname() != 'SIA': ...
mit
AntidoteLabs/Antidote-DM
Antidotes DM/youtube_dl/extractor/slutload.py
146
1390
from __future__ import unicode_literals import re from .common import InfoExtractor class SlutloadIE(InfoExtractor): _VALID_URL = r'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P<id>[^/]+)/?$' _TEST = { 'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/', 'md5': '0...
gpl-2.0
joram/sickbeard-orange
sickbeard/searchCurrent.py
18
1154
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
gpl-3.0
MobinRanjbar/hue
apps/about/src/about/views.py
28
2381
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
MattsFleaMarket/python-for-android
python3-alpha/python3-src/Lib/distutils/util.py
46
24178
"""distutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. """ import sys, os, string, re from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn from distutils import log from distutils.erro...
apache-2.0
naturalatlas/mapnik
scons/scons-local-3.0.1/SCons/Tool/mslib.py
5
2224
"""SCons.Tool.mslib Tool-specific initialization for lib (MicroSoft library archiver). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2017 The SCons Foundation # # Permission is her...
lgpl-2.1
pythonlittleboy/python_gentleman_crawler
index/ActorDAO.py
1
3021
from index import SysConst import time def saveActors(actors): newActors = [] conn = SysConst.getConnect() for actor in actors: exist = saveActor(actor, conn) if not exist: newActors.append(actor) conn.commit() conn.close() return newActors d...
apache-2.0
nexiles/odoo
addons/account/test/test_parent_structure.py
432
2108
# -*- 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...
agpl-3.0
evilp/android_kernel_hp_phobos
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
samuelshaner/openmc
tests/test_mgxs_library_ce_to_mg/test_mgxs_library_ce_to_mg.py
1
3449
#!/usr/bin/env python import os import sys import glob import hashlib sys.path.insert(0, os.pardir) from testing_harness import PyAPITestHarness from input_set import PinCellInputSet import openmc import openmc.mgxs class MGXSTestHarness(PyAPITestHarness): def _build_inputs(self): # Set the input set to ...
mit
DelazJ/QGIS
python/plugins/db_manager/db_plugins/oracle/sql_dictionary.py
30
14745
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS (Oracle) Date : Aug 27, 2014 copyright : (C) 2014 by Médéric RIBREUX email : meder...
gpl-2.0
ogrisel/scipy
scipy/cluster/hierarchy.py
5
93671
""" ======================================================== Hierarchical clustering (:mod:`scipy.cluster.hierarchy`) ======================================================== .. currentmodule:: scipy.cluster.hierarchy These functions cut hierarchical clusterings into flat clusterings or find the roots of the forest f...
bsd-3-clause
tomkralidis/pyowssc
pyowssc/model.py
1
5172
# -*- coding: ISO-8859-15 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2011 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files...
mit
takis/django
tests/utils_tests/test_decorators.py
319
4870
from django.http import HttpResponse from django.template import engines from django.template.response import TemplateResponse from django.test import RequestFactory, SimpleTestCase from django.utils.decorators import classproperty, decorator_from_middleware class ProcessViewMiddleware(object): def process_view(s...
bsd-3-clause
janocat/odoo
addons/account_voucher/report/account_voucher_sales_receipt.py
326
5808
############################################################################## # # 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 Public L...
agpl-3.0
mandeepdhami/neutron
neutron/tests/unit/extensions/foxinsocks.py
6
3536
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
knifenomad/django
tests/template_tests/syntax_tests/test_comment.py
521
3667
from django.test import SimpleTestCase from ..utils import setup class CommentSyntaxTests(SimpleTestCase): @setup({'comment-syntax01': '{# this is hidden #}hello'}) def test_comment_syntax01(self): output = self.engine.render_to_string('comment-syntax01') self.assertEqual(output, 'hello') ...
bsd-3-clause
maestrano/openerp
openerp/addons/auth_signup/controllers/main.py
51
3502
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
JVenberg/PokemonGo-Bot-Desktop
pywin/Lib/encodings/iso2022_kr.py
816
1053
# # iso2022_kr.py: Python Unicode Codec for ISO2022_KR # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_kr') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncod...
mit
ametheus/berlin
bin/berlin/network_config.py
1
23565
#!/usr/bin/env python """ Copyright (C) 2011 Thijs van Dijk This file is part of berlin. Berlin 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 y...
gpl-3.0
eeshangarg/zulip
zerver/tests/test_slack_message_conversion.py
3
4897
import os from typing import Any, Dict, List, Tuple import orjson from zerver.data_import.slack_message_conversion import ( convert_to_zulip_markdown, get_user_full_name, ) from zerver.lib import mdiff from zerver.lib.test_classes import ZulipTestCase class SlackMessageConversion(ZulipTestCase): def ass...
apache-2.0
appleseedhq/gaffer
python/GafferImageTest/ImageSamplerTest.py
8
3744
########################################################################## # # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
bsd-3-clause
lepture/pythondotorg
users/tests/test_models.py
7
1764
import datetime from django.contrib.auth import get_user_model from django.test import TestCase from django.utils import timezone from ..factories import UserFactory, MembershipFactory from ..models import Membership User = get_user_model() class UsersModelsTestCase(TestCase): def test_create_superuser(self): ...
apache-2.0
matplotlib/freetypy
docstrings/charmap.py
1
5602
# -*- coding: utf-8 -*- # Copyright (c) 2015, Michael Droettboom 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. Redistributions of source code must retain the above copyright # notice, t...
bsd-2-clause
alianmohammad/pd-gem5
tests/configs/realview64-minor-dual.py
33
2393
# 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
jaor/python
bigml/api_handlers/batchcentroidhandler.py
2
4344
# -*- coding: utf-8 -*- # # Copyright 2014-2021 BigML # # 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 ...
apache-2.0
mscherer/ansible-modules-core
utilities/logic/async_wrapper.py
10
7027
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
gpl-3.0
torhve/FrameworkBenchmarks
frameworks/Go/beego/setup.py
6
1099
import subprocess import sys import os def start(args, logfile, errfile): if os.name == 'nt': subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\beego&&go get ./...", shell=True, cwd="beego", stderr=errfile, stdout=logfile) subprocess.Popen("setup.bat", shell=True, cwd="beego", stderr=errfile, stdout=logf...
bsd-3-clause
torchingloom/edx-platform
common/lib/chem/chem/chemcalc.py
67
14752
from __future__ import division from fractions import Fraction from pyparsing import (Literal, StringEnd, OneOrMore, ParseException) import nltk from nltk.tree import Tree ARROWS = ('<->', '->') ## Defines a simple pyparsing tokenizer for chemical equations elements = ['Ac', 'Ag', 'Al', 'Am', 'Ar', 'As', 'At', 'Au',...
agpl-3.0
bearstech/ansible
lib/ansible/module_utils/manageiq.py
6
4239
# # Copyright (c) 2017, Daniel Korn <korndaniel1@gmail.com> # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the...
gpl-3.0
MikeLing/shogun
examples/undocumented/python/multiclass_randomforest.py
6
1175
#!/usr/bin/env python from numpy import array traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_multiclass.dat' # set both input attributes as not nominal (ie. continuous) feattypes = array([False, False]) parameter_list = [[traindat,testdat,label_train...
gpl-3.0
kenwith/cs561
cs561-as2-kenwith/pox_module/cs561/ofhandler.py
1
5315
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
gpl-3.0
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pip/commands/__init__.py
143
2145
""" Package containing all pip commands """ from __future__ import absolute_import from pip.commands.completion import CompletionCommand from pip.commands.download import DownloadCommand from pip.commands.freeze import FreezeCommand from pip.commands.hash import HashCommand from pip.commands.help import HelpCommand fr...
mit
programadorjc/django
tests/i18n/test_percents.py
222
6847
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import os from django.template import Context, Template from django.test import SimpleTestCase, override_settings from django.utils._os import upath from django.utils.encoding import force_text from django.utils.translation import activate, get_languag...
bsd-3-clause
suiyuan2009/tensorflow
tensorflow/contrib/framework/python/ops/ops.py
94
2599
# 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
dstufft/sqlalchemy
examples/postgis/__init__.py
30
1159
"""A naive example illustrating techniques to help embed PostGIS functionality. This example was originally developed in the hopes that it would be extrapolated into a comprehensive PostGIS integration layer. We are pleased to announce that this has come to fruition as `GeoAlchemy <http://www.geoalchemy.org/>`_. The...
mit
tastynoodle/django
docs/_ext/literals_to_xrefs.py
92
4869
""" Runs through a reST file looking for old-style literals, and helps replace them with new-style references. """ import re import sys import shelve refre = re.compile(r'``([^`\s]+?)``') ROLES = ( 'attr', 'class', "djadmin", 'data', 'exc', 'file', 'func', 'lookup', 'meth', 'm...
bsd-3-clause
meirwah/st2contrib
packs/puppet/actions/lib/puppet_client.py
15
4657
import json import copy import httplib import requests __all__ = [ 'PuppetHTTPAPIClient' ] class PuppetHTTPAPIClient(object): BASE_GET_HEADERS = { 'Accept': 'text/pson' } BASE_POST_HEADERS = { 'Content-Type': 'text/pson' } def __init__(self, master_hostname, master_port, cli...
apache-2.0
mattt416/neutron
neutron/extensions/providernet.py
29
3511
# Copyright (c) 2012 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
xiaoxiamii/scikit-learn
sklearn/linear_model/base.py
66
16933
""" Generalized Linear models. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Vincent Michel <vincent.michel@inria.fr> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # ...
bsd-3-clause
gauribhoite/personfinder
app/pytz/zoneinfo/America/Juneau.py
9
6439
'''tzinfo timezone information for America/Juneau.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Juneau(DstTzInfo): '''America/Juneau timezone definition. See datetime.tzinfo for details''' zone = 'America/Juneau' ...
apache-2.0
aninternetof/bremen
bremenenv/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
2360
3778
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re __version__ = '3.4.0.2' class CertificateError(ValueError): pass def _dnsname_match(dn, host...
mit
antonve/s4-project-mooc
common/lib/xmodule/xmodule/tests/test_capa_module.py
12
81450
# -*- coding: utf-8 -*- """ Tests of the Capa XModule """ # pylint: disable=missing-docstring # pylint: disable=invalid-name import datetime import json import random import os import textwrap import unittest import ddt from mock import Mock, patch, DEFAULT import webob from webob.multidict import MultiDict import x...
agpl-3.0
SebastianMerz/calalert
Server/venv/lib/python2.7/site-packages/werkzeug/contrib/securecookie.py
318
12204
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
gpl-2.0
AKS1996/VOCOWA
merge_images.py
1
2513
from operator import add from numpy import subtract from PIL import Image, ImageMath def merge(name_img1, name_img2, position_wrt_img1=(0, 0)): """ Merges two images. Currently, works for -ve position too :param name_img1: Image 1 :param name_img2: Image 2 :param position_wrt_img1: Merging w.r.t....
mit
jhdulaney/fulla
fulla/droplet.py
1
5978
# # fulla -- work with Digital Ocean # # Copyright (C) 2015 John H. Dulaney <jdulaney@fedoraproject.org> # # Licensed under the GNU General Public License Version 2 # # 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 ...
gpl-3.0
PythonCharmers/bokeh
bokeh/charts/utils.py
42
7607
""" This is the utils module that collects convenience functions and code that are useful for charts ecosystem. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # Th...
bsd-3-clause
openfun/edx-platform
lms/djangoapps/verify_student/tests/fake_software_secure.py
29
1657
""" Fake Software Secure page for use in acceptance tests. """ from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.utils.decorators import method_decorator from django.views.generic.base import View from edxmako.shortcuts ...
agpl-3.0
liorvh/phantomjs
src/qt/qtwebkit/Source/WebKit2/Scripts/generate-messages-header.py
145
1809
#!/usr/bin/env python # # Copyright (C) 2010 Apple 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: # 1. Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
abhilashnta/edx-platform
common/test/acceptance/pages/studio/settings_group_configurations.py
74
10062
""" Course Group Configurations page. """ from bok_choy.promise import EmptyPromise from .course_page import CoursePage from .utils import confirm_prompt class GroupConfigurationsPage(CoursePage): """ Course Group Configurations page. """ url_path = "group_configurations" experiment_groups_css = ...
agpl-3.0
PowerDNS/exabgp
lib/exabgp/bgp/message/update/nlri/flow.py
1
16373
# encoding: utf-8 """ flow.py Created by Thomas Mangin on 2010-01-14. Copyright (c) 2009-2013 Exa Networks. All rights reserved. """ # Do not use __slots__ here, we never create enough of them to be worth it # And it really break complex inheritance from struct import pack from struct import unpack from exabgp.pro...
bsd-3-clause
GetSomeBlocks/ServerStatus
resources/lib/twisted/twisted/conch/test/test_knownhosts.py
60
34426
# Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.client.knownhosts}. """ import os from binascii import Error as BinasciiError, b2a_base64, a2b_base64 try: import Crypto import pyasn1 except ImportError: skip = "PyCrypto and PyASN1 required for tw...
mit
momennaas/kalam-lp
constants.py
1
15769
# -*- encoding: utf-8 -*- ############################################################## ## Author: Abdulmumen Naas ## Description: Arabic Natural Language Processor (Kalam-lp) ## Version: 0.0.1 ## Copyright (c) 2014 Abdulmumen Naas ############################################################# from alefba imp...
mit
srinathv/vispy
examples/tutorial/gloo/lighted_cube.py
18
5014
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
bsd-3-clause
40423217/2016fallcadp_hw
plugin/liquid_tags/test_audio.py
273
1456
from . import audio import pytest import re @pytest.mark.parametrize('input,expected', [ ('http://foo.bar https://bar.foo', ('http://foo.bar', 'https://bar.foo', None)), ('http://test.foo', ('http://test.foo', None, None)), ('https://test.foo', ('https://test.foo', None, None)), ('http:...
agpl-3.0
Zanzibar82/streamondemand.test
servers/vk.py
67
9258
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para VK Server # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from cor...
gpl-3.0
rkashapov/buildbot
master/buildbot/scheduler.py
11
1352
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
alsrgv/tensorflow
tensorflow/contrib/predictor/__init__.py
93
1229
# 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
mpimenov/omim
tools/python/airmaps/instruments/utils.py
4
1380
import os import shutil from datetime import datetime from typing import Iterable from airflow.operators.python_operator import PythonOperator from maps_generator.generator.env import Env from maps_generator.generator.stages import Stage from maps_generator.generator.stages import get_stage_name from maps_generator.m...
apache-2.0
chapmanb/bcbio-nextgen
bcbio/variation/pisces.py
4
4024
"""Tumor only somatic calling with Pisces. https://github.com/Illumina/Pisces """ import os import shutil import pysam from bcbio import utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import shared from bcbio.pipeline import datadict as dd from bcbio.provenance import do from bc...
mit
kangkot/arangodb
3rdParty/V8-4.3.61/build/gyp/test/standalone-static-library/gyptest-standalone-static-library.py
186
1891
#!/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. """ Verifies build of a static_library with the standalone_static_library flag set. """ import os import subprocess import sys import TestG...
apache-2.0
jaffee/pigeon
pigeon/views.py
1
2258
from pigeon import app from copy import deepcopy import re import requests from flask import request import json JIRA_PROJECTS = app.config['JIRA_PROJECTS'] JIRA_URL = app.config['JIRA_URL'] USER = app.config['JIRA_USER'] PASS = app.config['JIRA_PASS'] ISSUE_COMMENT_URL = JIRA_URL + "/rest/api/2/issue/{issueIdOrKey}/...
mit
SCOAP3/invenio
invenio/ext/logging/backends/fs.py
18
2491
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio 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...
gpl-2.0
sgoudelis/mybitbank
mybitbank/middleware/switcher.py
1
3010
""" The MIT License (MIT) Copyright (c) 2016 Stratos Goudelis 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, me...
mit
cpknowles/BRG
black_rapids_forward_model/Test_black_rapids_forward_model.py
1
15674
from pylab import * from scipy.interpolate import RectBivariateSpline from scipy import ndimage as nd import numpy as np import gdal ############################################################################### #HOW DOES H0 SET INITIAL THICKNESS?? SOMEHOW S_spline of x and y minus the interpolated B vector(?) sets ...
mit
saidimu/POSTMan-Chrome-Extension
tests/selenium/pmtests/postman_tests_requests.py
104
23191
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.select import Select from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys import selenium.webdriver.chrome.service as service import tracebac...
apache-2.0
h3llrais3r/Auto-Subliminal
lib/pushbullet/listener.py
3
2841
__author__ = 'Igor Maculan <n3wtron@gmail.com>' import logging import time import json from threading import Thread import requests import websocket log = logging.getLogger('pushbullet.Listener') WEBSOCKET_URL = 'wss://stream.pushbullet.com/websocket/' class Listener(Thread, websocket.WebSocketApp): def __in...
gpl-3.0
jeffersonvenancio/BarzingaNow
python/user/controller.py
1
4306
import os import json import cloudstorage as gcs import datetime from flask import Blueprint, request, session from google.appengine.api import search from google.appengine.api import app_identity from credit.model import Credit from transaction.model import Transaction from user.model import User user = Blueprint(...
apache-2.0
bjzhang/xen_arm_pv
tools/python/xen/xm/main.py
3
37535
# (C) Copyright IBM Corp. 2005 # Copyright (C) 2004 Mike Wray # Copyright (c) 2005-2006 XenSource Ltd. # # Authors: # Sean Dague <sean at dague dot net> # Mike Wray <mike dot wray at hp dot com> # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the G...
gpl-2.0
goliveirab/odoo
addons/account_analytic_analysis/account_analytic_analysis.py
96
48446
# -*- 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
cgvarela/vitess
py/vtproto/mysqlctl_pb2.py
6
9108
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: mysqlctl.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _refl...
bsd-3-clause
quodlibet/mutagen
tests/test_asf.py
1
23454
import os import warnings from io import BytesIO from mutagen.asf import ASF, ASFHeaderError, ASFValue, UNICODE, DWORD, QWORD from mutagen.asf import BOOL, WORD, BYTEARRAY, GUID from mutagen.asf._util import guid2bytes, bytes2guid from mutagen.asf._objects import ContentDescriptionObject, \ ExtendedContentDescrip...
gpl-2.0
transientskp/tkp
tkp/utility/containers.py
3
2605
""" Container classes for the TKP pipeline. These provide convenient means of marshalling the various types of data -- lightcurves, detections, sources, etc -- that the pipeline must handle. """ import logging logger = logging.getLogger(__name__) class ObjectContainer(list): """A container class for objects. ...
bsd-2-clause
shail2810/nova
nova/tests/unit/api/openstack/compute/test_simple_tenant_usage.py
17
13935
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
jmacmahon/invenio
modules/bibfield/lib/functions/is_type_num.py
3
1214
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. # # Invenio 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 # Li...
gpl-2.0
jeanlinux/calibre
src/calibre/ebooks/markdown/extensions/sane_lists.py
46
1327
""" Sane List Extension for Python-Markdown ======================================= Modify the behavior of Lists in Python-Markdown t act in a sane manor. In standard Markdown sytex, the following would constitute a single ordered list. However, with this extension, the output would include two lists, the first an ...
gpl-3.0
igorlimasan/pythonbirds
diagramas/testes/atores_testes.py
10
47143
# -*- coding: utf-8 -*- from __future__ import unicode_literals from os import path import sys project_dir = path.dirname(__file__) project_dir = path.join('..') sys.path.append(project_dir) import unittest from unittest.case import TestCase from atores import Ator, DESTRUIDO, ATIVO, Obstaculo, Porco, PassaroAmarelo...
mit
twiest/openshift-tools
ansible/roles/lib_statuspageio/library/statuspage_incident.py
6
24082
#!/usr/bin/env python # pylint: disable=too-many-lines ''' Ansible module ''' # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _...
apache-2.0
olivierdalang/QGIS
tests/src/python/test_qgsmaplayerstore.py
30
20567
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMapLayerStore. .. note:: 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. """ ...
gpl-2.0
stewartsmith/bzr
bzrlib/tests/blackbox/test_view.py
2
5051
# Copyright (C) 2008 Canonical Ltd # # 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 ...
gpl-2.0
GenericStudent/home-assistant
tests/components/plex/const.py
8
1384
"""Constants used by Plex tests.""" from homeassistant.components.media_player import DOMAIN as MP_DOMAIN from homeassistant.components.plex import const from homeassistant.const import ( CONF_CLIENT_ID, CONF_HOST, CONF_PORT, CONF_TOKEN, CONF_URL, CONF_VERIFY_SSL, ) MOCK_SERVERS = [ { ...
apache-2.0
bala4901/odoo
addons/report_webkit/company.py
431
2562
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
python-packages/hyperopt-0.0.2/hyperopt/tests/test_pchoice.py
6
4524
from functools import partial import numpy as np import unittest from sklearn import datasets from hyperopt import hp, Trials, fmin, tpe, rand import hyperopt.pyll.stochastic class TestPChoice(unittest.TestCase): def test_basic(self): space = hp.pchoice('naive_type', [(.14, 'gaussian'), ...
bsd-3-clause
noba3/KoTos
addons/plugin.video.mega/resources/lib/platform_libraries/Linux/32bit/Crypto/SelfTest/Hash/test_SHA256.py
11
3224
# -*- coding: utf-8 -*- # # SelfTest/Hash/SHA256.py: Self-test for the SHA-256 hash function # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedi...
gpl-2.0
ros2/ci
tools/get_coverage_ros2_pkg.py
1
4862
#!/usr/bin/env python3 import argparse import os import requests import subprocess import sys import tempfile # Compare if a list is inside other list in order # From here: https://stackoverflow.com/a/20789669 def is_slice_in_list(s, l): len_s = len(s) return any(s == l[i:len_s + i] for i in range(len(l) - l...
apache-2.0
menzenski/tagger-tester
razmetka/tag/tag.py
2
3178
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import os import subprocess32 from nltk.tag.stanford import StanfordPOSTagger from .config import DATA_DIR_NAME, PATH_TO_DATA_DIR from .files import write_to_directory class FilePair(object): """Pair of files: one for training and one for testing.""" ...
mit
jesseditson/rethinkdb
test/rql_test/connections/http_support/flask/testsuite/ext.py
563
5156
# -*- coding: utf-8 -*- """ flask.testsuite.ext ~~~~~~~~~~~~~~~~~~~ Tests the extension import thing. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import unittest try: from imp import reload as reload_module except ImportError: reload...
agpl-3.0
saurabh6790/omnitech-lib
website/doctype/blog_post/blog_post.py
34
3425
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes import webnotes.webutils from webnotes.webutils import WebsiteGenerator, cleanup_page_name from webnotes import _ from webnotes.utils import today class DocTy...
mit
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/mccabe.py
15
10693
""" Meager code path measurement tool. Ned Batchelder http://nedbatchelder.com/blog/200803/python_code_complexity_microtool.html MIT License. """ from __future__ import with_statement import optparse import sys import tokenize from collections import defaultdict try: import ast from ast import ite...
apache-2.0
technologiescollege/s2a_fr
s2a/Python/Lib/test/inspect_fodder2.py
213
1279
# line 1 def wrap(foo=None): def wrapper(func): return func return wrapper # line 7 def replace(func): def insteadfunc(): print 'hello' return insteadfunc # line 13 @wrap() @wrap(wrap) def wrapped(): pass # line 19 @replace def gone(): pass # line 24 oll = lambda m: m # line...
gpl-3.0
zasdfgbnm/tensorflow
tensorflow/python/eager/function_test.py
1
23337
# Copyright 2017 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
DUCSS/ducss-site-old
project/local_settings.py
1
1631
DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'database.sqlite3', # Or path to database file if using sqlite3. 'USER': '', # ...
mit