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
efajardo/osg-test
osgtest/tests/test_590_gsiopenssh.py
1
2254
import os import pwd import shutil import socket import tempfile from osgtest.library import core from osgtest.library import osgunittest SOURCE_PATH = '/usr/share/osg-test/test_gridftp_data.txt' class TestGSIOpenSSH(osgunittest.OSGTestCase): hostname = socket.getfqdn() temp_dir = None remote_path = No...
apache-2.0
opencord/cord
scripts/imagebuilder.py
1
50939
#!/usr/bin/env python # Copyright 2017-present Open Networking Foundation # # 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 b...
apache-2.0
mikek2/actstream
actstream/tests/test_gfk.py
3
4232
from django.test import TestCase from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Group from actstream.models import Action from actstream.compat import get_user_model from actstream.tests.base import LTE class GFKManagerTestCase(TestCase): def setUp(self): ...
bsd-3-clause
ArvisP/Rubix
tmp/bs4_test.py
2
1126
from bs4 import BeautifulSoup from urllib.request import urlopen import sys r = urlopen("https://www.worldcubeassociation.org/competitions") soup = BeautifulSoup(r, "html.parser") date_box = soup.find_all('span', attrs={'class': 'date'}) title_box = soup.find_all('p', attrs={'class': 'competition-link'}) location_bo...
mit
mheap/ansible
test/runner/lib/cloud/nios.py
7
5273
"""NIOS plugin for integration tests.""" from __future__ import absolute_import, print_function import os from . import ( CloudProvider, CloudEnvironment, ) from ..util import ( find_executable, display, ) from ..docker_util import ( docker_run, docker_rm, docker_inspect, docker_pul...
gpl-3.0
kaplun/Invenio-OpenAIRE
modules/websubmit/lib/functions/Retrieve_Data.py
35
1426
## 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 ## License, or (at your ...
gpl-2.0
BizzCloud/PosBox
addons/project_timesheet/__openerp__.py
62
2234
# -*- 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
gutomaia/Meta
setup.py
2
1629
# Copyright (c) 2008-2011 by Enthought, Inc. # All rights reserved. from setuptools import setup, find_packages try: long_description = open('README.rst').read() except IOError as err: long_description = str(err) try: version_str = open('version.txt').read() except IOError as err: version_str = '???'...
bsd-3-clause
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/tests/contrib/test_dictionary_storage.py
21
3487
# Copyright 2016 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 ...
gpl-3.0
goulu/networkx
networkx/algorithms/tree/tests/test_recognition.py
10
4069
from nose.tools import * import networkx as nx class TestTreeRecognition(object): graph = nx.Graph multigraph = nx.MultiGraph def setUp(self): self.T1 = self.graph() self.T2 = self.graph() self.T2.add_node(1) self.T3 = self.graph() self.T3.add_nodes_from(range...
bsd-3-clause
koobonil/Boss2D
Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/learn/python/learn/session_run_hook.py
144
1204
# 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...
mit
Eureka22/ASM_xf
PythonD/lib/python2.4/encodings/zlib_codec.py
16
1793
""" Python 'zlib_codec' Codec - zlib compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import zlib # this codec needs the optional zlib modu...
gpl-2.0
MeirKriheli/Open-Knesset
committees/migrations/0024_auto__chg_field_protocolpart_body__chg_field_protocolpart_header__chg_.py
5
28085
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'ProtocolPart.body' db.alter_column(u'committees_protoc...
bsd-3-clause
jeffsilverm/presentation
whats_new_in_python_3.6/secrets_demo.py
1
2020
#! /usr/bin/python3.6 # -*- coding: utf-8 -*- # # secrets.py - a demonstration of the secrets module new in python 3.6 # secrets implements a cryptographically secure random number generator # PEP-506 describes the motivation for CSPRNG https://www.python.org/dev/peps/pep-0506/ import tempfile import secrets import s...
gpl-2.0
josiah-wolf-oberholtzer/supriya
tests/nonrealtime/test_nonrealtime_Node_set_duration.py
2
9037
import pytest import uqbar.strings import supriya.assets.synthdefs import supriya.nonrealtime def test_basic(): session = supriya.nonrealtime.Session() with session.at(0): node = session.add_group(duration=20) assert session.to_strings() == uqbar.strings.normalize( """ 0.0: ...
mit
matt-kwong/grpc
test/cpp/qps/gen_build_yaml.py
9
4165
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 applicable l...
apache-2.0
barseghyanartur/python-social-auth
social/tests/backends/test_skyrock.py
92
1343
import json from social.p3 import urlencode from social.tests.backends.oauth import OAuth1Test class SkyrockOAuth1Test(OAuth1Test): backend_path = 'social.backends.skyrock.SkyrockOAuth' user_data_url = 'https://api.skyrock.com/v2/user/get.json' expected_username = 'foobar' access_token_body = json.du...
bsd-3-clause
sejust/pykit
proc/proc.py
2
3298
#!/usr/bin/env python2 # coding: utf-8 import errno import logging import os import subprocess32 logger = logging.getLogger(__name__) class ProcError(Exception): def __init__(self, returncode, out, err, cmd, arguments, options): super(ProcError, self).__init__(returncode, ...
mit
Awayet/twitter_ebooks
log.py
1
2954
#!/usr/bin/env python # -*- coding: UTF-8 -*- import sys import escape from time import gmtime, strftime, time import sqlite3 from traceback import format_exc import config import os htime = strftime("%a %Y-%m-%d %H:%M:%S%z",gmtime()) utime = int(time()) def print_message(_body, _section, _level, _time=""): try: ...
bsd-2-clause
auready/django
tests/gis_tests/test_measure.py
35
7398
""" Distance and Area objects to allow for sensible and convenient calculation and conversions. Here are some tests. """ import unittest from django.contrib.gis.measure import A, Area, D, Distance class DistanceTest(unittest.TestCase): "Testing the Distance object" def testInit(self): "Testing init...
bsd-3-clause
MERegistro/meregistro
meregistro/apps/oferta_nacional/views.py
1
3879
# -*- coding: UTF-8 -*- from django.http import HttpResponseRedirect, HttpResponse from datetime import datetime from django.core.urlresolvers import reverse from meregistro.shortcuts import my_render from apps.seguridad.decorators import login_required, credential_required from apps.seguridad.models import Usuario, P...
bsd-3-clause
takis/django
tests/i18n/patterns/tests.py
256
14326
from __future__ import unicode_literals import os from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import clear_url_caches, reverse, translate_url from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django.template impor...
bsd-3-clause
joelddiaz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.7.42-1/roles/lib_openshift/library/oc_adm_registry.py
3
94326
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
iainr/fridgid
Fridge.py
1
9372
import RPi.GPIO as GPIO import datetime import time import pandas as pd import logging import logging.handlers import sys logger = logging.getLogger('fridge') handler = logging.StreamHandler() fHandler = logging.FileHandler('fridge.log') formatter = logging.Formatter("%(asctime)s %(levelname)s %(message)s", "%Y-...
lgpl-3.0
chris4795/u-boot-novena
tools/rkmux.py
14
6095
#!/usr/bin/python # Script to create enums from datasheet register tables # # Usage: # # First, create a text file from the datasheet: # pdftotext -layout /path/to/rockchip-3288-trm.pdf /tmp/asc # # Then use this script to output the #defines for a particular register: # ./tools/rkmux.py GRF_GPIO4C_IOMUX # # It ...
gpl-2.0
tarikkdiry/Flock
flask/lib/python2.7/site-packages/whoosh/lang/isri.py
95
17041
# -*- coding: utf-8 -*- # # Natural Language Toolkit: The ISRI Arabic Stemmer # # Copyright (C) 2001-2012 NLTK Proejct # Algorithm: Kazem Taghva, Rania Elkhoury, and Jeffrey Coombs (2005) # Author: Hosam Algasaier <hosam_hme@yahoo.com> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ ISRI A...
bsd-3-clause
billyvg/piebot
piebot/modules/isup.py
1
1085
"""Checks isup.me to see if a website is up @package ppbot @syntax isup <word> """ import requests import re from piebot.modules import * class Isup(Module): def __init__(self, *args, **kwargs): """Constructor""" Module.__init__(self, kwargs=kwargs) self.url = "http://www.isup.me/%s" ...
mit
LLNL/spack
var/spack/repos/builtin/packages/simplemoc/package.py
5
1492
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Simplemoc(MakefilePackage): """The purpose of this mini-app is to demonstrate the perform...
lgpl-2.1
MoKee/android_kernel_xiaomi_cancro
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
vianuevm/Webparser
ENV/Lib/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py
1730
3405
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
gpl-2.0
cryptapus/electrum-uno
gui/kivy/__init__.py
1
2137
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
mit
tinloaf/home-assistant
homeassistant/components/switch/hlk_sw16.py
2
1669
""" Support for HLK-SW16 switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.hlk_sw16/ """ import logging from homeassistant.components.hlk_sw16 import ( SW16Device, DOMAIN as HLK_SW16, DATA_DEVICE_REGISTER) from homeassistant.compon...
apache-2.0
Dingmatt/AMSA
Plug-ins/Amsa.bundle/Contents/Libraries/Shared/plex/client.py
3
2730
from plex.core.configuration import ConfigurationManager from plex.core.http import HttpClient from plex.helpers import has_attribute from plex.interfaces import construct_map from plex.interfaces.core.base import InterfaceProxy from plex.lib.six import add_metaclass from plex.objects.core.manager import ObjectManager ...
gpl-3.0
MarkWh1te/xueqiu_predict
python3_env/lib/python3.4/site-packages/sqlalchemy/sql/compiler.py
17
107328
# sql/compiler.py # Copyright (C) 2005-2016 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 """Base SQL and DDL compiler implementations. Classes provided include: :class:`.c...
mit
cernops/nova
nova/db/sqlalchemy/migrate_repo/versions/315_add_migration_progresss_detail.py
26
1230
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
barbarubra/Don-t-know-What-i-m-doing.
python/src/Lib/test/test_gettext.py
58
17536
import os import base64 import shutil import gettext import unittest from test import test_support # TODO: # - Add new tests, for example for "dgettext" # - Remove dummy tests, for example testing for single and double quotes # has no sense, it would have if we were testing a parser (i.e. pygettext) # - Tests ...
apache-2.0
SickGear/SickGear
lib/hachoir_py3/parser/misc/__init__.py
2
1121
from hachoir_py3.parser.misc.file_3do import File3do # noqa from hachoir_py3.parser.misc.file_3ds import File3ds # noqa from hachoir_py3.parser.misc.torrent import TorrentFile # noqa from hachoir_py3.parser.misc.ttf import TrueTypeFontFile # noqa from hachoir_py3.parser.misc.chm import ChmFile # noqa from hachoir_...
gpl-3.0
zenners/angular-contacts
node_modules/firebase/node_modules/faye-websocket/node_modules/websocket-driver/node_modules/websocket-extensions/node_modules/jstest/node_modules/karma/node_modules/grunt-conventional-github-releaser/node_modules/grunt-contrib-nodeunit/node_modules/tap/node_modules/yamlish/yamlish-py/setup.py
160
1406
# coding: utf-8 from setuptools import setup requires_list = [ "PyYAML>=3.09" ] import os.path def read(fname): with open(os.path.join(os.path.dirname(__file__), fname)) as inf: return "\n" + inf.read().replace("\r\n", "\n") setup( name='yamlish', version="0.17.0", description='Python imp...
mit
ClearwaterCore/gmock-upstream
test/gmock_output_test.py
986
5999
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
ColOfAbRiX/ansible
lib/ansible/modules/cloud/lxd/lxd_profile.py
18
12235
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Hiroaki Nakamura <hnakamur@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...
gpl-3.0
thomashaw/SecGen
modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/mynotify.py
2
6741
#!/usr/bin/env python ''' This software was created by United States Government employees at The Center for the Information Systems Studies and Research (CISR) at the Naval Postgraduate School NPS. Please note that within the United States, copyright protection is not available for any works created by United Sta...
gpl-3.0
jquacinella/python-twitter
examples/twitter-to-xhtml.py
5
2756
#!/usr/bin/env python # Copyright 2007-2016 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
chrisxue815/leetcode_python
problems/test_1074.py
1
1156
import unittest from typing import List import utils # O(mn^2) time. O(mn) space. Prefix sum. class Solution: def numSubmatrixSumTarget(self, matrix: List[List[int]], target: int) -> int: result = 0 m = len(matrix) n = len(matrix[0]) sums = [[0] * m for _ in range(n + 1)] ...
unlicense
juanyaw/python
cpython/Lib/test/test_ftplib.py
7
37729
"""Test script for ftplib module.""" # Modified by Giampaolo Rodola' to test FTP class, IPv6 and TLS # environment import ftplib import asyncore import asynchat import socket import io import errno import os import time try: import ssl except ImportError: ssl = None from unittest import TestCase, skipUnless ...
bsd-3-clause
hvdieren/parsec-swan
pkgs/libs/libxml2/src/python/tests/thread2.py
87
2240
#!/usr/bin/python -u import string, sys, time import thread from threading import Thread, Lock import libxml2 THREADS_COUNT = 15 failed = 0 class ErrorHandler: def __init__(self): self.errors = [] self.lock = Lock() def handler(self,ctx,str): self.lock.acquire() self.errors...
bsd-3-clause
seanh/pyblosxom-simplemarkdown
pyblosxomsimplemarkdown/__init__.py
2
1639
__author__ = "Sean Hammond pyblosxomsimplemarkdown at seanh dot cc" __version__ = "0.1" __url__ = "https://github.com/seanh/pyblosxomsimplemarkdown" __description__ = ("A Pyblosxom entryparser plugin that uses Markdown syntax " "and parses the whole file as the entry body") from Py...
gpl-3.0
doublerr/torment
torment/decorators.py
5
3750
# Copyright 2015 Alex Brandt # # 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, ...
apache-2.0
DonBeo/statsmodels
statsmodels/stats/inter_rater.py
34
17035
# -*- coding: utf-8 -*- """Inter Rater Agreement contains -------- fleiss_kappa cohens_kappa aggregate_raters: helper function to get data into fleiss_kappa format to_table: helper function to create contingency table, can be used for cohens_kappa Created on Thu Dec 06 22:57:56 2012 Author: Josef Perktold Li...
bsd-3-clause
sestrella/ansible
lib/ansible/module_utils/network/ios/providers/cli/config/bgp/neighbors.py
15
6850
# # (c) 2019, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # import re from ansible.module_utils.six import iteritems from ansible.module_utils.network.common.utils import to_list from ansible.module_utils.network.ios.providers.providers import Cl...
gpl-3.0
ptkool/spark
python/pyspark/sql/tests/test_pandas_udf.py
12
10115
# # 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
sofianehaddad/ot-svn
python/test/t_ProcessSample_std.py
2
2014
#! /usr/bin/env python from openturns import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # size of timeGrid size = 6 dimension = 1 sample = NumericalSample(size, dimension) for i in range(size): for j in range(dimension): sample[i, j] = i + j + 1 # TimeGrid time...
mit
adwiputra/LUMENS-repo
processing/admintools/geoserver/util.py
6
1231
# -*- coding: utf-8 -*- """ *************************************************************************** util.py --------------------- Date : November 2012 Copyright : (C) 2012 by David Winslow Email : dwins at opengeo dot com *******************************...
gpl-2.0
dalegregory/odoo
addons/event/wizard/event_confirm.py
339
1387
# -*- 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
raghavrv/scikit-learn
examples/linear_model/plot_logistic.py
73
1568
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= Logistic function ========================================================= Shown in the plot is how the logistic regression would, in this synthetic dataset, classify values as either 0 or 1, i.e. class one or tw...
bsd-3-clause
a-doumoulakis/tensorflow
tensorflow/contrib/gan/python/losses/python/losses_wargs.py
73
1174
# Copyright 2017 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 agree...
apache-2.0
mozilla/fjord
vendor/packages/requests-2.7.0/requests/packages/urllib3/__init__.py
482
2055
""" urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' __license__ = 'MIT' __version__ = '1.10.4' from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import en...
bsd-3-clause
oe-alliance/openmultibootmanager
src/ubi_reader/ubifs/misc.py
2
2179
#!/usr/bin/env python ############################################################# # ubi_reader/ubifs # (c) 2013 Jason Pruitt (jrspruitt@gmail.com) # # 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 Foundat...
gpl-2.0
tSed/buildroot
support/testing/infra/__init__.py
3
2877
import contextlib import os import re import sys import tempfile import subprocess from urllib2 import urlopen, HTTPError, URLError ARTIFACTS_URL = "http://autobuild.buildroot.net/artefacts/" def open_log_file(builddir, stage, logtofile=True): """ Open a file for logging and return its handler. If logtofi...
gpl-2.0
zyq001/ryu
ryu/services/protocols/vrrp/utils.py
37
2419
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
apache-2.0
MjAbuz/foundation
foundation/djangocms_pagebanner/cms_toolbar.py
1
2382
from cms.api import get_page_draft from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from cms.utils import get_cms_setting from cms.utils.permissions import has_page_change_permission from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.translation import ugette...
mit
viru/ansible-modules-core
cloud/openstack/os_server_actions.py
54
7060
#!/usr/bin/python # coding: utf-8 -*- # Copyright (c) 2015, Jesse Keating <jlk@derpops.bike> # # This module 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 opti...
gpl-3.0
RenegadesTV/repository.renegadestv
script.renegadestv/streaming.py
5
11689
# # Copyright (C) 2014 Tommy Winther # http://tommy.winther.nu # # Modified for FTV Guide (09/2014 onwards) # by Thomas Geppert [bluezed] - bluezed.apps@gmail.com # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
gpl-2.0
apporc/neutron
neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_sriov_nic_agent.py
15
13083
# Copyright 2014 Mellanox Technologies, Ltd # # 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 t...
apache-2.0
sv-dev1/odoo
addons/project_issue/project_issue.py
217
29319
#-*- 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
maheshp/novatest
nova/tests/baremetal/test_ipmi.py
9
8176
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, 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....
apache-2.0
Charlotte-Morgan/inasafe
safe/gis/vector/tools.py
4
16940
# coding=utf-8 """Tools for vector layers.""" import logging from math import isnan import ogr from qgis.core import ( QgsSpatialIndex, QgsFeatureRequest, QgsFeature, QgsField, QgsProject, QgsDistanceArea, QgsWkbTypes, QgsCoordinateReferenceSystem, QgsMemoryProviderUtils, Qgs...
gpl-3.0
cybertk/depot_tools
third_party/boto/auth.py
51
26228
# Copyright 2010 Google Inc. # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 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 re...
bsd-3-clause
perryjohnson/biplaneblade
sandia_blade_lib/prep_stn32_mesh.py
1
10860
"""Write initial TrueGrid files for one Sandia blade station. Usage ----- start an IPython (qt)console with the pylab flag: $ ipython qtconsole --pylab or $ ipython --pylab Then, from the prompt, run this script: |> %run sandia_blade_lib/prep_stnXX_mesh.py or |> import sandia_blade_lib/prep_stnXX_mesh Au...
gpl-3.0
paulproteus/django
django/contrib/gis/geos/prototypes/coordseq.py
624
3112
from ctypes import c_double, c_int, c_uint, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, CS_PTR from django.contrib.gis.geos.prototypes.errcheck import last_arg_byref, GEOSException from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc ## Error-checking routines specific to coordinate seq...
bsd-3-clause
chuan9/chromium-crosswalk
build/android/gyp/ant.py
109
2148
#!/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. """An Ant wrapper that suppresses useless Ant output. Ant build scripts output "BUILD SUCCESSFUL" and build timing at the end of eve...
bsd-3-clause
40223137/w17w17
static/Brython3.1.1-20150328-091302/Lib/unittest/suite.py
748
9715
"""TestSuite""" import sys from . import case from . import util __unittest = True def _call_if_exists(parent, attr): func = getattr(parent, attr, lambda: None) func() class BaseTestSuite(object): """A simple test suite that doesn't provide class or module shared fixtures. """ def __init__(se...
gpl-3.0
astrofrog/glue-vispy-viewers
glue_vispy_viewers/extern/vispy/ext/_bundled/ordereddict.py
21
9002
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # MIT-licensed from: # http://code.activestate.com/recipes/576693/ # http://docs.python.org/2/library/collections.html#ordereddict-objects try: from thread im...
bsd-2-clause
plotly/plotly.py
packages/python/plotly/plotly/validators/streamtube/legendgrouptitle/_font.py
1
1540
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="streamtube.legendgrouptitle", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_n...
mit
aceofall/zephyr-iotos
doc/scripts/extract_content.py
15
1990
#!/usr/bin/env python3 # # Copyright (c) 2017, Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # Very quick script to move docs from different places into the doc directory # to fix the website and external links import os import shutil import re import sys import fnmatch # direcories to search for .rst f...
apache-2.0
Bobobol/nemubot-1
prompt/builtins.py
1
4530
# -*- coding: utf-8 -*- # Nemubot is a modulable IRC bot, built around XML configuration files. # Copyright (C) 2012 Mercier Pierre-Olivier # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundat...
agpl-3.0
trulia/thoth-demo
activemq/examples/stomp/python/stomppy/publisher.py
8
1616
#!/usr/bin/env python # ------------------------------------------------------------------------ # 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 li...
bsd-3-clause
sirpercival/kivy
kivy/core/clipboard/__init__.py
8
1731
''' Clipboard ========= Core class for accessing the Clipboard. If we are not able to access the system clipboard, a fake one will be used. Usage example:: >>> from kivy.core.clipboard import Clipboard >>> Clipboard.get_types() ['TIMESTAMP', 'TARGETS', 'MULTIPLE', 'SAVE_TARGETS', 'UTF8_STRING', 'COMP...
mit
SDSG-Invenio/invenio
invenio/modules/upgrader/upgrades/invenio_release_1_2_0.py
23
1274
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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
chauhanhardik/populo
lms/lib/comment_client/thread.py
58
8410
import logging from eventtracking import tracker from .utils import merge_dict, strip_blank, strip_none, extract, perform_request from .utils import CommentClientRequestError import models import settings log = logging.getLogger(__name__) class Thread(models.Model): # accessible_fields can be set and retrieved...
agpl-3.0
QianBIG/odoo
addons/marketing_campaign/__init__.py
380
1087
# -*- 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
Martin456/eve
eve/methods/post.py
2
11303
# -*- coding: utf-8 -*- """ eve.methods.post ~~~~~~~~~~~~~~~~ This module implements the POST method, supported by the resources endpoints. :copyright: (c) 2017 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ from datetime import datetime from flask import current_app as ...
bsd-3-clause
zyguan/HDFS-503-on-0.20.2
src/contrib/hod/testing/testThreads.py
182
3075
#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 thi...
apache-2.0
junmoa/dpark
dpark/env.py
6
3049
import os import logging import time import socket import shutil import zmq from dpark import util import dpark.conf as conf logger = logging.getLogger(__name__) class DparkEnv: environ = {} @classmethod def register(cls, name, value): cls.environ[name] = value @classmethod def get(cl...
bsd-3-clause
spoqa/settei
tests/base_test.py
1
17192
import enum import pathlib import typing # noqa import warnings from pytest import mark, raises from .utils import os_environ from settei.base import (ConfigKeyError, ConfigTypeError, Configuration, ConfigValueError, ConfigWarning, config_object_property, config_prop...
apache-2.0
markshao/pytest
testing/test_runner_xunit.py
2
7526
""" test correct setup/teardowns at module, class, and instance level """ import pytest def test_module_and_function_setup(testdir): reprec = testdir.inline_runsource( """ modlevel = [] def setup_module(module): assert not modlevel module.modlevel.append(42) ...
mit
silentfuzzle/calibre
src/calibre/ebooks/fb2/__init__.py
14
1506
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' def base64_de...
gpl-3.0
jmankoff/data
Assignments/jmankoff-mobile/lib/werkzeug/local.py
97
14123
# -*- coding: utf-8 -*- """ werkzeug.local ~~~~~~~~~~~~~~ This module implements context-local objects. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from functools import update_wrapper from werkzeug.wsgi import ClosingIt...
gpl-3.0
bosstb/HaberPush
youtube_dl/extractor/cda.py
11
5302
# coding: utf-8 from __future__ import unicode_literals import codecs import re from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, int_or_none, parse_duration, ) class CDAIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www\.)?cda\.pl/video|ebd\.cda\.pl/[0-9]+...
mit
wilseypa/warped2-models
scripts/plotBags.py
1
12059
#!/usr/bin/python # Calculates statistics and plots the bag metrics from raw data from __future__ import print_function import csv import os, sys import numpy as np import scipy as sp import scipy.stats as sps import pandas as pd import re, shutil, tempfile import itertools, operator import subprocess import Gnuplot ...
mit
thomasvs/morituri
morituri/test/test_common_encode.py
2
4799
# -*- Mode: Python; test-case-name: morituri.test.test_common_encode -*- # vi:si:et:sw=4:sts=4:ts=4 import os import tempfile import gobject gobject.threads_init() import gst from morituri.common import encode from morituri.extern.task import task, gstreamer from morituri.test import common class PathTestCase(c...
gpl-3.0
nitzmahone/ansible
lib/ansible/modules/cloud/amazon/iam_role_facts.py
50
8111
#!/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
EDUlib/edx-platform
cms/djangoapps/contentstore/outlines.py
1
8767
""" This is where Studio interacts with the learning_sequences application, which is responsible for holding course outline data. Studio _pushes_ that data into learning_sequences at publish time. """ from datetime import timezone from typing import List, Tuple from edx_django_utils.monitoring import function_trace, s...
agpl-3.0
Aorjoa/aiyara-ceph-dash
.tox/py27/lib/python2.7/site-packages/werkzeug/testapp.py
364
9396
# -*- coding: utf-8 -*- """ werkzeug.testapp ~~~~~~~~~~~~~~~~ Provide a small test application that can be used to test a WSGI server and check it for WSGI compliance. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ impo...
bsd-2-clause
yamila-moreno/django
django/conf/locale/ru/formats.py
1059
1267
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j E Y г.' TIME_FORMAT = 'G:i' DAT...
bsd-3-clause
ghgr/BetFair_Arbitrer
estimator.py
1
4553
""" The MIT License (MIT) Copyright (c) 2015 Eduardo Pena Vina 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, m...
mit
cuongnv23/ansible
lib/ansible/modules/network/lenovo/cnos_portchannel.py
26
22094
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, 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
srickardti/openthread
third_party/mbedtls/repo/tests/scripts/mbedtls_test.py
9
13403
# Greentea host test script for Mbed TLS on-target test suite testing. # # Copyright (C) 2018, Arm Limited, All Rights Reserved # SPDX-License-Identifier: Apache-2.0 # # 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 ...
bsd-3-clause
karibou/sosreport
sos/plugins/ds.py
8
2933
# Copyright (C) 2007 Red Hat, Inc., Kent Lamb <klamb@redhat.com> # Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com> # 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 versi...
gpl-2.0
xiaoixa/python
neo1218/0023/web/migrations/env.py
185
2221
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
mit
ideasiii/ControllerPlatform
Controller-WheelPies/extLibs/mongo-cxx-driver/src/mongo/base/generate_error_codes.py
6
8992
#!/usr/bin/python # Copyright 2012 10gen 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 applicab...
gpl-3.0