code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Similar to 'ps aux --forest' on Linux, prints the process list as a tree structure. $ python scripts/pstree.py 0 ? |- 1 init | ...
0-wiz-0/psutil
scripts/pstree.py
Python
bsd-3-clause
1,690
class code_str(str): """string that reproduces without quotes. """ def __repr__(self): return str.__repr__(self)[1:-1] import generate from generate import * __doc__ = generate.__doc__ # load modules so they can register themselves (better way?) try: import generate_sqlobject except Impo...
santisiri/popego
popego/popserver/fixture/command/generate/__init__.py
Python
bsd-3-clause
402
__all__ = ("po", "survey", ) import templates.IFRC.po import templates.IFRC.survey
flavour/eden
modules/templates/IFRC/__init__.py
Python
mit
106
import socket from io import BytesIO from netlib.exceptions import HttpSyntaxException from netlib.http import http1 from netlib.tcp import TCPClient from netlib.tutils import treq, raises import tutils import tservers class TestHTTPResponse: def test_read_from_stringio(self): s = ( b"HTTP/1....
0xwindows/InfoLeak
test/test_protocol_http.py
Python
mit
2,459
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
SUSE/azure-sdk-for-python
azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py
Python
mit
1,019
# Copyright 2008, Red Hat, Inc # Steve Salevan <ssalevan@redhat.com> # # This software may be freely redistributed under the terms of the GNU # general public license. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., ...
caglar10ur/func
func/minion/modules/overlord.py
Python
gpl-2.0
2,549
import os, logging from autotest_lib.client.bin import test, utils from autotest_lib.client.common_lib import error class pktgen(test.test): version = 1 def execute(self, eth='eth0', count=50000, clone_skb=1, \ dst_ip='192.168.210.210', dst_mac='01:02:03:04:05:07'): if not os.path...
yochow/autotest
client/tests/pktgen/pktgen.py
Python
gpl-2.0
1,652
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = """ GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Golismero project site: https://github.com/golismero Golismero project mail: contact@golismero-project.com This program is free software; you can redistribute it and/or modify it under the terms of...
golismero/golismero
plugins/testing/recon/punkspider.py
Python
gpl-2.0
5,708
#!/usr/bin/env python ''' Dive ArduSub in SITL AP_FLAKE8_CLEAN ''' from __future__ import print_function import os import sys import time from pymavlink import mavutil from common import AutoTest from common import NotAchievedException from common import AutoTestTimeoutException if sys.version_info[0] < 3: Co...
fhedberg/ardupilot
Tools/autotest/ardusub.py
Python
gpl-3.0
13,856
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para mcanime # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re import urlparse from core import config from core imp...
Hernanarce/pelisalacarta
python/main-classic/channels/mcanime.py
Python
gpl-3.0
20,689
"""Word cloud is ungraded xblock used by students to generate and view word cloud. On the client side we show: If student does not yet answered - `num_inputs` numbers of text inputs. If student have answered - words he entered and cloud. """ import json import logging from pkg_resources import resource_string from x...
louyihua/edx-platform
common/lib/xmodule/xmodule/word_cloud_module.py
Python
agpl-3.0
8,567
try: # Python 2 from StringIO import StringIO except ImportError: # Python 3 from io import StringIO import pddl from pddl_to_prolog import Rule, PrologProgram def test_normalization(): prog = PrologProgram() prog.add_fact(pddl.Atom("at", ["foo", "bar"])) prog.add_fact(pddl.Atom("truck", [...
fawcettc/planning-features
torchlight/GENERATE-VARS/translate/tests/test_normalization.py
Python
agpl-3.0
1,563
############################################################## # Copyright 2021 Lawrence Livermore National Security, LLC # (c.f. AUTHORS, NOTICE.LLNS, COPYING) # # This file is part of the Flux resource manager framework. # For details, see https://github.com/flux-framework. # # SPDX-License-Identifier: LGPL-3.0 #####...
garlick/flux-core
t/ingest/bad-validate.py
Python
lgpl-3.0
663
#! /usr/local/bin/stackless2.6 import cherrypy class HelloWorld(object): def index(self, name='World'): return 'Hello, <b>%s</b>!' % name index.exposed = True if __name__ == "__main__": cherrypy.quickstart(HelloWorld())
HanWenfang/syncless
examples/demo_orig_cherrypy.py
Python
apache-2.0
233
# -*- coding: utf-8 -*- ############################################################################### # # DownloadFile # Retrieves the content for a specific file. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/CloudDrive/Files/DownloadFile.py
Python
apache-2.0
5,317
''' 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 this ...
arenadata/ambari
ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py
Python
apache-2.0
2,129
import os __test__ = False shared = None if os.environ.get('eventlet_test_in_progress') == 'yes': # pyopenssl imported urllib before we could patch it # we can ensure this shared module was not imported # https://github.com/eventlet/eventlet/issues/362 import tests.patcher.shared_import_socket as shar...
kawamon/hue
desktop/core/ext-py/eventlet-0.24.1/tests/patcher/shared1.py
Python
apache-2.0
366
try: from ._version import version as __version__ except ImportError: __version__ = "0.0.0+unknown"
googlefonts/fontmake
Lib/fontmake/__init__.py
Python
apache-2.0
108
# 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...
wileeam/airflow
tests/cli/commands/test_version_command.py
Python
apache-2.0
1,326
# 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...
kobejean/tensorflow
tensorflow/python/ops/control_flow_ops_test.py
Python
apache-2.0
39,046
# Xlib.xobject.resource -- any X resource object # # Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se> # # 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 t...
OlivierLarrieu/HYDV2_EFL
Xlib/xobject/resource.py
Python
artistic-2.0
1,768
""" Results for SARIMAX tests Results from R, KFAS library using script `test_ucm.R`. See also Stata time series documentation. Author: Chad Fulton License: Simplified-BSD """ from numpy import pi irregular = { 'models': [ {'irregular': True}, {'level': 'irregular'}, {'level': 'ntrend'}, ...
wdurhamh/statsmodels
statsmodels/tsa/statespace/tests/results/results_structural.py
Python
bsd-3-clause
7,116
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Forum.forum_logo' db.add_column('djangobb_forum_forum', 'forum_logo', ...
saifrahmed/DjangoBB
djangobb_forum/south_migrations/0006_auto__add_field_forum_forum_logo.py
Python
bsd-3-clause
16,082
#!/usr/bin/env python """ .. todo:: WRITEME """ #argument: path to a pkl file #loads the pkl file and figures out which fields are CudaNDArrays import sys if __name__ == "__main__": path = sys.argv[1] from pylearn2.utils import serial import inspect obj = serial.load(path) from theano.sand...
shiquanwang/pylearn2
pylearn2/scripts/find_gpu_fields.py
Python
bsd-3-clause
783
from __future__ import division, print_function, unicode_literals # important: set cocos_utest=1 in the environment before run. # that simplifies the pyglet mockup needed # remember to erase or set to zero for normal runs import os assert os.environ['cocos_utest'] # set the desired pyglet mockup import sys sys.path.i...
vyscond/cocos
utest/test_director_scene_changes.py
Python
bsd-3-clause
5,322
#------------------------------------------------------------------------------- # # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions ...
pankajp/pyface
pyface/dock/__init__.py
Python
bsd-3-clause
1,018
# Problem Set 6: # Visualization code for simulated robots. # # See the problem set for instructions on how to use this code. import math import time from Tkinter import * class RobotVisualization: def __init__(self, num_robots, width, height, delay = 0.2): "Initializes a visualization with the specified...
fossilet/6.00x
week7/problemset7/ps7_visualize.py
Python
mit
4,584
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software # Foundation; All Rights Reserved """A HTTPSConnection/Handler with additional proxy and cert validation features. In particular, monkey patches in Python r74203 to provide support for CONNECT proxies and adds SSL cert validation if the ssl modu...
Sorsly/subtle
google-cloud-sdk/lib/third_party/fancy_urllib/__init__.py
Python
mit
17,199
#!/usr/bin/env python # # Copyright 2007 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 your option) ...
UpYou/relay
my_gnuradio/gr/qa_argmax.py
Python
gpl-3.0
2,150
# orm/dynamic.py # Copyright (C) 2005-2012 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 """Dynamic collection API. Dynamic collections act like Query() objects for read opera...
fredericmohr/mitro
mitro-mail/build/venv/lib/python2.7/site-packages/sqlalchemy/orm/dynamic.py
Python
gpl-3.0
11,788
# drizzle/base.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2010-2011 Monty Taylor <mordred@inaugust.com> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: drizz...
fredericmohr/mitro
mitro-mail/build/venv/lib/python2.7/site-packages/sqlalchemy/dialects/drizzle/base.py
Python
gpl-3.0
15,008
# 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 https://mozilla.org/MPL/2.0/. # Generated by Django 2.2.8 on 2020-01-22 17:57 from django.db import migrations, models import django_extensions.db....
flodolo/bedrock
bedrock/security/migrations/0006_auto_20200122_0957.py
Python
mpl-2.0
884
# -*- 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...
addition-it-solutions/project-all
addons/point_of_sale/report/pos_lines.py
Python
agpl-3.0
2,302
#!/usr/bin/env python # Copyright (C) 2016-2017 Pelagicore AB # # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the # above copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AN...
thenor/softwarecontainer
scripts/run-unit-tests.py
Python
lgpl-2.1
2,312
import unittest from Selenium2Library.keywords._browsermanagement import _BrowserManagementKeywords from selenium import webdriver class BrowserManagementTests(unittest.TestCase): def test_create_firefox_browser(self): test_browsers = ((webdriver.Firefox, "ff"), (webdriver.Firefox, "firEfOx")) ...
Hi-Fi/robotframework-selenium2library
test/unit/keywords/test_browsermanagement.py
Python
apache-2.0
2,690
# 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 ag...
KaranToor/MA450
google-cloud-sdk/lib/googlecloudsdk/core/util/http_proxy_types.py
Python
apache-2.0
959
"""Config flow for Tradfri.""" import asyncio from uuid import uuid4 import async_timeout from pytradfri import Gateway, RequestError from pytradfri.api.aiocoap_api import APIFactory import voluptuous as vol from homeassistant import config_entries from .const import ( CONF_GATEWAY_ID, CONF_HOST, CONF_ID...
nkgilley/home-assistant
homeassistant/components/tradfri/config_flow.py
Python
apache-2.0
6,153
# Copyright 2020 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...
tensorflow/tensorflow
tensorflow/python/keras/saving/saved_model/load_context.py
Python
apache-2.0
1,779
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
jdanbrown/pydatalab
tests/_util/lru_cache_tests.py
Python
apache-2.0
1,509
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015-2016 Red Hat, Inc. and/or its affiliates # and other contributors as indicated by the @author tags. # # 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 ...
jpkrohling/hawkular-apm
examples/polyglot-zipkin/python-pyramid/zipkin_python/app.py
Python
apache-2.0
3,242
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: January 15, 2007 # Author: Ivan Vilata i Balaguer - ivan at selidor dot net # # $Id$ # ######################################################################## """Functionality related with no...
gdementen/PyTables
tables/path.py
Python
bsd-3-clause
6,949
__version__ = '1.4.0' __author__ = 'Flask-Admin team' __email__ = 'serge.koval+github@gmail.com' from .base import expose, expose_plugview, Admin, BaseView, AdminIndexView
mikelambert/flask-admin
flask_admin/__init__.py
Python
bsd-3-clause
174
#!/usr/bin/env vpython # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Functions for adding results to perf dashboard.""" # This file was copy-pasted over from: # //build/scripts/slave/results_dash...
chromium/chromium
tools/perf/core/results_dashboard.py
Python
bsd-3-clause
18,706
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the prioritisetransaction mining RPC.""" from test_framework.test_framework import BitcoinTestFra...
cryptoprojects/ultimateonlinecash
test/functional/prioritise_transaction.py
Python
mit
5,686
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
tsdgeos/snapcraft
snapcraft/integrations/travis.py
Python
gpl-3.0
8,805
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Flowroute LLC # Written by Matthew Williams <matthew@flowroute.com> # Based on yum module written by Seth Vidal <skvidal at fedoraproject.org> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
tonyyarusso/ansible-modules-core
packaging/os/apt.py
Python
gpl-3.0
24,206
# Copyright (C) 2010-2014 GRNET S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed i...
allmende/synnefo
snf-cyclades-app/synnefo/logic/management/commands/backend-remove.py
Python
gpl-3.0
2,948
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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 Foundation, eit...
abstract-open-solutions/hr
__unported__/hr_payroll_extension/__openerp__.py
Python
agpl-3.0
2,040
# -*- coding: utf-8 -*- # 漏 2016 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from psycopg2 import ProgrammingError from openerp.modules.registry import RegistryManager from openerp.tools import config from openerp.tools.misc import mute_logger from openerp.tests.commo...
initOS/server-tools
database_cleanup/tests/test_database_cleanup.py
Python
agpl-3.0
3,883
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2003-2008 Jan Decaluwe # # The myhdl 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 t...
jmgc/myhdl-numeric
cosimulation/icarus/test/test_all.py
Python
lgpl-2.1
1,448
# coding: utf-8 # # Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
shakamunyi/solum
solum/openstack/common/db/sqlalchemy/migration.py
Python
apache-2.0
9,869
"""Support for OpenWRT (ubus) routers.""" import json import logging import re import requests import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner) from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME from homeassistant.exception...
MartinHjelmare/home-assistant
homeassistant/components/ubus/device_tracker.py
Python
apache-2.0
7,766
import pytest from api.base.settings.defaults import API_BASE from api_tests.providers.mixins import ProviderListViewTestBaseMixin from api.providers.workflows import Workflows from osf_tests.factories import ( RegistrationProviderFactory, ) class TestRegistrationProviderList(ProviderListViewTestBaseMixin): ...
Johnetordoff/osf.io
api_tests/providers/registrations/views/test_registration_provider_list.py
Python
apache-2.0
1,027
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
silkyar/570_Big_Little
tests/configs/o3-timing-mp-ruby.py
Python
bsd-3-clause
2,393
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/proto/spanner/v1/keys.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 ...
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/google/cloud/proto/spanner/v1/keys_pb2.py
Python
mit
8,070
import time now = time.time from zope.interface import Interface from twisted.python.failure import Failure from twisted.internet import defer from foolscap.api import eventually from allmydata import uri from allmydata.codec import CRSDecoder from allmydata.util import base32, log, hashutil, mathutil, observer from a...
pombredanne/tahoe-lafs
src/allmydata/immutable/downloader/node.py
Python
gpl-2.0
24,074
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
david-ragazzi/nupic
nupic/encoders/base.py
Python
gpl-3.0
28,557
from django.db import models from django.utils.translation import ugettext_lazy as _ from nodeshot.core.base.models import BaseDate from . import Profile class SocialLink(BaseDate): """ External links like website or social network profiles """ user = models.ForeignKey(Profile, verbose_name=_('user')...
sephiroth6/nodeshot
nodeshot/community/profiles/models/social_link.py
Python
gpl-3.0
658
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Ren茅 Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
nhicher/ansible
lib/ansible/modules/cloud/cloudstack/cs_account.py
Python
gpl-3.0
11,356
#!/usr/bin/env python # 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 sys, array, re, os, struct, time, signal, platform, subprocess, SocketServer, os.path fro...
adobe-flash/avmplus
test/util/flashrunner/flashrunner.py
Python
mpl-2.0
7,750
# -*- coding: utf-8 -*- from __future__ import print_function import base64 import copy import io import math import re import traceback from hashlib import md5 from PIL import Image from xml.etree import ElementTree as ET from odoo.tools import pycompat try: import jcconv except ImportError: jcconv = None ...
maxive/erp
addons/hw_escpos/escpos/escpos.py
Python
agpl-3.0
31,727
# Copyright (c) 2002 Vivake Gupta (vivakeATomniscia.org). All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any late...
tadgh/ArgoRevisit
third_party/nltk/stem/porter.py
Python
apache-2.0
21,620
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, 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, # t...
jrogers512/pynet
class6/library/eos_config.py
Python
apache-2.0
17,292
""" Fast approximation for k-component structure """ # Copyright (C) 2015 by # Jordi Torrents <jtorrents@milnou.net> # All rights reserved. # BSD license. import itertools import collections import networkx as nx from networkx.exception import NetworkXError from networkx.utils import not_implemented_for ...
cmtm/networkx
networkx/algorithms/approximation/kcomponents.py
Python
bsd-3-clause
12,560
import os def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration libraries = [] if os.name == 'posix': libraries.append('m') config = Configuration('classification', parent_package, top_path) config.add_extension('_simple_tree', ...
PythonCharmers/orange3
Orange/classification/setup.py
Python
gpl-3.0
808
#!/usr/bin/python2.5 # # Copyright 2009 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 applicable law or...
rekbun/browserscope
base/cron.py
Python
apache-2.0
3,338
""" This component provides HA sensor support for Ring Door Bell/Chimes. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.ring/ """ from datetime import timedelta import logging import voluptuous as vol import homeassistant.helpers.config_validati...
MungoRae/home-assistant
homeassistant/components/sensor/ring.py
Python
apache-2.0
4,651
# Copyright (c) 2012 OpenStack 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 by applicable law or agreed to...
ntt-sic/neutron
neutron/common/topics.py
Python
apache-2.0
1,775
# Copyright 2012 OpenStack Foundation # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ht...
hayderimran7/tempest
tempest/services/compute/json/server_groups_client.py
Python
apache-2.0
2,438
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest asdf = pytest.importorskip('asdf') from numpy.random import random, randint import astropy.units as u from astropy.coordinates import Angle import astropy.coordinates.representation as r from asdf.tests.helpers im...
pllim/astropy
astropy/io/misc/asdf/tags/coordinates/tests/test_representation.py
Python
bsd-3-clause
984
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() class Migration...
lyoniionly/django-notifications
notifications/south_migrations/0001_initial.py
Python
bsd-3-clause
7,137
import numpy as np import cv2 import time from SimpleCV.Camera import VimbaCamera def printPrettyHeader(msg): print "*"*80 + "\n* %s *\n" % msg + "*"*80 def _getProperty(c): printPrettyHeader("Test getProperty") prop = "ExposureMode" print "%s=%s" % (prop, c.getProperty(prop)) def _getAllProperties...
beni55/SimpleCV
SimpleCV/tests/test_vimba.py
Python
bsd-3-clause
2,809
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mkhoeini/zerorpc-python
zerorpc/core.py
Python
mit
14,535
## This file is part of Invenio. ## Copyright (C) 2009, 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 option) any later versio...
kaplun/Invenio-OpenAIRE
modules/bibharvest/web/admin/oairepositoryadmin.py
Python
gpl-2.0
8,674
# 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...
NeCTAR-RC/swift
swift/proxy/controllers/__init__.py
Python
apache-2.0
970
#!/usr/bin/env python3 # Copyright 2021 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. """Command-line tool for finding differences in dependency graphs.""" import argparse import itertools from typing import List, Set, ...
nwjs/chromium.src
tools/android/dependency_analysis/diff_graphs.py
Python
bsd-3-clause
6,037
# (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...
thaim/ansible
test/units/executor/test_play_iterator.py
Python
mit
18,331
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # Copyright (c) 2019 Matti Ranta, (@techknowlogick) # # 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_METADAT...
helldorado/ansible
lib/ansible/modules/cloud/azure/azure_rm_mariadbconfiguration_facts.py
Python
gpl-3.0
6,344
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.test.utils import override_settings from treemap.units import (is_convertible, is_formattable, get_display_value, is_convertible_or_formattable, ...
johnsonc/OTM2
opentreemap/treemap/tests/test_units.py
Python
gpl-3.0
6,116
import json from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import Http404 from django.test import TestCase from django.test.client import Client, RequestFactory from django.test.utils import override_settings from mock import Mock, patch from ...
bdero/edx-platform
lms/djangoapps/notification_prefs/tests.py
Python
agpl-3.0
10,380
from django.conf.urls import url from . import views urlpatterns = ( url('^incoming/?$', views.incoming, name='compat.incoming'), url('^reporter/?$', views.reporter, name='compat.reporter'), url('^reporter/(.+)$', views.reporter_detail, name='compat.reporter_detail'), )
harikishen/addons-server
src/olympia/compat/urls.py
Python
bsd-3-clause
294
SECRET_KEY = "Please do not spew DeprecationWarnings" # Haystack settings for running tests. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'haystack_tests.db', } } INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
josesanch/django-haystack
tests/settings.py
Python
bsd-3-clause
571
# -*- coding: utf-8 -*- from __future__ import unicode_literals #: Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', 'Wroc艂aw'), ('jeleniagora', 'Jelenia G贸ra'), ('legnica', 'Legnica'), ('boleslawiecki', 'boles...
rodrigolucianocosta/ControleEstoque
rOne/Storage101/django-localflavor/django-localflavor-1.3/localflavor/pl/pl_administrativeunits.py
Python
gpl-3.0
12,852
# Copyright (c) 2014 VMware, 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...
ityaptin/ceilometer
ceilometer/tests/unit/compute/virt/vmware/test_vsphere_operations.py
Python
apache-2.0
6,895
# 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...
ghchinoy/tensorflow
tensorflow/contrib/eager/python/examples/gan/mnist_graph_test.py
Python
apache-2.0
6,523
#!/usr/bin/env python2 from __future__ import print_function import os import stat try: import config except ImportError: print('Created personal config.py for your customizations') import shutil shutil.copyfile('config.py.dist', 'config.py') import config TEMPLATE_FILE = 'powerline_shell_base.py'...
rudolfovich/.dotfiles
powerline-shell/install.py
Python
apache-2.0
1,269
from django import http from django.core.paginator import Paginator, InvalidPage from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from livesettings import config_value from product.models import Product from product.queries import bestsellers import logging ...
russellmayhew/satchmo
satchmo/apps/product/views/filters.py
Python
bsd-3-clause
1,481
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
stgraber/snapcraft
snapcraft/plugins/nil.py
Python
gpl-3.0
1,196
#!/bin/env python # Copyright (c) 2016 PaddlePaddle 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 ...
lispc/Paddle
v1_api_demo/model_zoo/embedding/paraconvert.py
Python
apache-2.0
5,485
""" kombu.clocks ============ Logical Clocks and Synchronization. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from __future__ import with_statement from threading import Lock __all__ = ["LamportClock"] class LamportClock(object...
mozilla/make.mozilla.org
vendor-local/lib/python/kombu/clocks.py
Python
bsd-3-clause
1,936
# -*- coding: utf-8 -*- import sys sys.path[0:0] = [""] import bson import os import pickle import unittest import uuid from datetime import datetime from bson import DBRef, ObjectId from tests import fixtures from tests.fixtures import (PickleEmbedded, PickleTest, PickleSignalsTest, Pickl...
yarneo/mongoengine
tests/document/instance.py
Python
mit
96,576
# -*- 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...
zenodo/invenio
invenio/modules/documents/tasks.py
Python
gpl-2.0
1,539
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Task,Options,Utils from waflib.TaskGen import before_method,feature,after_method,Task,extension from waflib.Configure import conf def init_rubyext...
OSSystems/glmark2
waflib/Tools/ruby.py
Python
gpl-3.0
4,025
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class IrModelField(models.Model): _inherit = 'ir.model.fields' tracking = fields.Integer( string="Enable Ordered Tracking", help="If set every modification done ...
jeremiahyan/odoo
addons/mail/models/ir_model_fields.py
Python
gpl-3.0
1,193
import pytest from ..gitignore import fnmatch_translate, PathFilter match_data = [ ("foo", False, ["a/foo", "foo"]), ("*.a", False, ["foo.a", "a/foo.a", "a/b/foo.a", "a.a/foo.a"]), ("*.py[co]", False, ["a.pyc", "a.pyo", "a/b/c.pyc"]), ("\\#*", False, ["#a", "a/#b"]), ("*#", False, ["a#", "a/b#", "...
Varentsov/servo
tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py
Python
mpl-2.0
2,104
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. St眉vel <sybren@stuvel.eu> # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
catapult-project/catapult
third_party/rsa/rsa/__init__.py
Python
bsd-3-clause
1,545
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _, throw, msgprint from frappe.utils import cstr, nowdate from frappe.model.document import Document class SMS...
hatwar/Das_erpnext
erpnext/setup/doctype/sms_settings/sms_settings.py
Python
agpl-3.0
3,544
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, 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 require...
annegentle/magnum
magnum/common/pythonk8sclient/client/models/V1beta3_PersistentVolumeStatus.py
Python
apache-2.0
1,363
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'WeeklyPresence' db.create_table('mks_weeklypresence', ( ('member', self.gf...
livni/old-OK
src/knesset/mks/migrations/0002_add_weeklypresence_model.py
Python
bsd-3-clause
5,699
# Copyright: (c) 2018, 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 = """ --- cliconf: edgeos short_description: Use edgeos cliconf to run command on ...
vmindru/ansible
lib/ansible/plugins/cliconf/edgeos.py
Python
gpl-3.0
2,418