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
icardenasr/ios
automation_Test/constants.py
10
1287
# -*- coding: utf-8 -*- #!/usr/bin/env python import os from datetime import datetime #--Generic Variables for use through Appium connection K_APP_FILE_NAME = '/../../ownCloud.app' K_APPIUM_VER = '1.4.1' K_APP_PLATFORM_NAME = 'iOS' K_APP_PLATFORM_VER = '8.4' K_DEVICE_NAME = 'iPhone 6' #--Webdriver property K_WD_EXP...
gpl-3.0
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/radical.utils-0.7.7-py2.7.egg/radical/utils/__init__.py
1
1700
__author__ = "Radical.Utils Development Team (Andre Merzky, Ole Weidner)" __copyright__ = "Copyright 2013, RADICAL@Rutgers" __license__ = "MIT" # import utility classes from object_cache import ObjectCache from plugin_manager import PluginManager from singleton import Singleton from threads import...
apache-2.0
sonalranjit/SECS
SECS_trace.py
2
1609
__author__ = 'sonal' import numpy as np from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.axes_grid1 import make_axes_locatable import os from math import * def polar_plot(grid, title): #z = grid[:,8] u = grid[:,8] v = grid[:,9] plt.f...
gpl-2.0
Tuxemon/Tuxemon
tuxemon/event/actions/add_item.py
1
1612
# # Tuxemon # Copyright (c) 2014-2017 William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon # # 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 #...
gpl-3.0
flavour/ifrc_qa
controllers/dvi.py
30
9609
# -*- coding: utf-8 -*- """ Disaster Victim Identification, Controllers """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def s3_...
mit
MackZxh/OCA-Choice
website/website_event_register_free/model/__init__.py
30
1041
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 Therp BV <http://therp.nl>. # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
lgpl-3.0
kevin-coder/tensorflow-fork
tensorflow/python/distribute/distribute_coordinator.py
3
34147
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
seem-sky/kbengine
kbe/res/scripts/common/Lib/distutils/tests/test_bdist_dumb.py
103
2899
"""Tests for distutils.command.bdist_dumb.""" import os import sys import zipfile import unittest from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support SETUP_PY = """\ from distutils.core import setup impo...
lgpl-3.0
rjonnal/zernike
__init__.py
1
20006
"""This module contains functions for Zernike calculations. Mainly the private function _zgen, a generator function for Zernike polynomials. The public functions make use of _zgen to create height or slope maps in a unit pupil, corresponding to individual Zernike terms. Author: Ravi S. Jonnal / Werner Lab, UC Davis R...
gpl-2.0
Liangjianghao/powerline
powerline/lib/config.py
38
6210
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import json import codecs from copy import deepcopy from threading import Event, Lock from collections import defaultdict from powerline.lib.threaded import MultiRunnedThread from powerline.lib.watcher ...
mit
tuxfux-hlp-notes/python-batches
archieves/batch-62/modules/mysheets/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/latin1prober.py
200
5248
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
dongguangming/django-books
models.py
1
1560
#import all of the things we will be using from django.db import models from tagging.fields import TagField # to help with translation of field names from django.utils.translation import ugettext_lazy as _ # to have a generic foreign key for any model from django.cont...
bsd-3-clause
xinjiguaike/edx-platform
lms/djangoapps/shoppingcart/tests/test_reports.py
101
12250
# -*- coding: utf-8 -*- """ Tests for the Shopping Cart Models """ import datetime import pytz import StringIO from textwrap import dedent from django.conf import settings from course_modes.models import CourseMode from shoppingcart.models import (Order, CertificateItem, PaidCourseRegistration, PaidCourseRegistratio...
agpl-3.0
lukeiwanski/tensorflow-opencl
tensorflow/contrib/cudnn_rnn/python/kernel_tests/cudnn_rnn_ops_test.py
40
14759
# 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
sadaf2605/django
tests/template_tests/filter_tests/test_length_is.py
161
3192
from django.template.defaultfilters import length_is from django.test import SimpleTestCase from ..utils import setup class LengthIsTests(SimpleTestCase): @setup({'length_is01': '{% if some_list|length_is:"4" %}Four{% endif %}'}) def test_length_is01(self): output = self.engine.render_to_string('len...
bsd-3-clause
fell978/kernel_huawei
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
kustodian/ansible
test/units/modules/storage/netapp/test_na_ontap_info.py
21
13319
# (c) 2018-2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit tests for ONTAP Ansible module na_ontap_info ''' from __future__ import print_function import json import pytest import sys from units.compat import unittest from units.compat.mock impor...
gpl-3.0
graycatlabs/PyBBIO
examples/HTU21D_test.py
2
1045
""" HTU21D_test.py Alexander Hiam <alex@graycat.io> An example to demonstrate the use of the HTU21D library included with PyBBIO. Interfaces with the HTU21D I2C relative humidity sensor. This example program is in the public domain. """ from bbio import * # Import the HTU21D class from the HTU21...
mit
ageron/tensorflow
tensorflow/contrib/cmake/python_sanity_test.py
46
3692
# 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
kailIII/emaresa
trunk.pe.bk/report_aeroo_direct_print/__openerp__.py
8
3097
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2008-2013 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> # # WARNING: This program as such is intended to be used by professional...
agpl-3.0
brandond/ansible
lib/ansible/plugins/strategy/free.py
10
12920
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
cxxgtxy/tensorflow
tensorflow/contrib/learn/python/learn/estimators/tensor_signature_test.py
137
8063
# 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
hosseinmh/Django_learning
djmod/.venv/lib/python3.5/site-packages/pkg_resources/_vendor/packaging/specifiers.py
1107
28025
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
mit
atul-bhouraskar/django
django/conf/locale/pt/formats.py
504
1717
# -*- 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 = r'j \d\e F \d\e Y' TIME_FORMAT = '...
bsd-3-clause
shashi792/courtlistener
alert/corpus_importer/brad_heath_oral_arguments/import_oa_from_csv.py
2
6072
"""This is a simple file that replicates/imports much of the current scraper's functionality. Some tricks that make it special: 1. It reads from a CSV. 1. It chooses the court based on a column in the CSV. 1. It cleans up the data like Juriscraper would normally do. 1. It inserts a delay after every item so as to sav...
agpl-3.0
pythonbyexample/PBE
dbe/classviews/dates.py
99
19804
import time import datetime from django.db import models from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import force_unicode from django.utils.translation import ugettext as _ from django.views.generic.base import View from django.views.generic.detail ...
bsd-3-clause
calfonso/ansible
lib/ansible/modules/network/ironware/ironware_facts.py
37
20033
#!/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
ArtsiomCh/tensorflow
tensorflow/contrib/data/python/kernel_tests/map_dataset_op_test.py
7
23891
# 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
p0psicles/SickRage
sickbeard/clients/mlnet_client.py
10
1740
# coding=utf-8 # Author: kounch # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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
horance-liu/tensorflow
tensorflow/tools/docs/build_docs_test.py
53
2485
# 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
mrjacobagilbert/gnuradio
gr-digital/python/digital/qa_crc32_bb.py
5
13448
#!/usr/bin/env python # Copyright 2012-2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks, digital import pmt class qa_crc32_bb(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_bloc...
gpl-3.0
2013Commons/hue
desktop/core/ext-py/python-openid-2.2.5/openid/store/nonce.py
180
2843
__all__ = [ 'split', 'mkNonce', 'checkTimestamp', ] from openid import cryptutil from time import strptime, strftime, gmtime, time from calendar import timegm import string NONCE_CHARS = string.ascii_letters + string.digits # Keep nonces for five hours (allow five hours for the combination of # reque...
apache-2.0
bigswitch/horizon
openstack_dashboard/dashboards/project/network_topology/ports/tables.py
73
1033
# Copyright 2013 NTT Innovation Institute 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 applic...
apache-2.0
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.5-beta1/content/Lib/email/header.py
255
22243
# Copyright (C) 2002-2006 Python Software Foundation # Author: Ben Gertzfield, Barry Warsaw # Contact: email-sig@python.org """Header encoding and decoding functionality.""" __all__ = [ 'Header', 'decode_header', 'make_header', ] import re import binascii import email.quoprimime import email.base64m...
gpl-3.0
felix-d/boto
boto/cloudsearchdomain/layer1.py
134
29110
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
firstval/micropython
tests/basics/class_store_class.py
52
1404
# Inspired by urlparse.py from CPython 3.3 stdlib # There was a bug in MicroPython that under some conditions class stored # in instance attribute later was returned "bound" as if it was a method, # which caused class constructor to receive extra argument. try: from collections import namedtuple except ImportError:...
mit
obriencj/python-javatools
tests/distinfo.py
2
1430
# This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be usefu...
lgpl-3.0
rspavel/spack
var/spack/repos/builtin/packages/bazel/package.py
1
12437
# 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) import re class Bazel(Package): """Bazel is an open-source build and test tool similar to Make, Maven, and Gradl...
lgpl-2.1
baylee-d/osf.io
api/caching/tests/test_caching.py
8
9194
from __future__ import unicode_literals import copy import random import unittest import uuid import requests from django.conf import settings as django_settings from requests.auth import HTTPBasicAuth from osf.models import OSFUser from scripts.create_fakes import create_fake_project from tests.base import DbTestCa...
apache-2.0
kant/inasafe
realtime/test/test_shake_event.py
4
25962
# -*- coding: utf-8 -*- """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Shake Event Test Cases.** Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publishe...
gpl-3.0
gurneyalex/OpenUpgrade
openerp/addons/test_impex/models.py
95
5855
# -*- coding: utf-8 -*- from openerp.osv import orm, fields def selection_fn(obj, cr, uid, context=None): return list(enumerate(["Corge", "Grault", "Wheee", "Moog"])) def function_fn(model, cr, uid, ids, field_name, arg, context): return dict((id, 3) for id in ids) def function_fn_write(model, cr, uid, id, fi...
agpl-3.0
mikewiebe-ansible/ansible
test/units/modules/storage/netapp/test_na_ontap_interface.py
20
10651
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ans...
gpl-3.0
taarifa/taarifa_backend
taarifa_backend/models.py
1
4325
import datetime from flask_security import RoleMixin, UserMixin from flask_mongoengine.wtf import model_form from taarifa_backend import db fieldmap = { 'BinaryField': db.BinaryField, 'BooleanField': db.BooleanField, 'ComplexDateTimeField': db.ComplexDateTimeField, 'DateTimeField': db.DateTimeField, ...
bsd-3-clause
SureshMatsui/SaveCoin
qa/rpc-tests/skeleton.py
1
2232
#!/usr/bin/env python # Skeleton for python-based regression tests using # JSON-RPC # Add python-SaveCoinrpc to module search path: import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-SaveCoinrpc")) import json import shutil import subprocess import tempfile import ...
mit
EdwardBeckett/fail2ban
fail2ban/server/transmitter.py
14
10839
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/ete2/webplugin/__init__.py
14
1459
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # t...
mit
disqus/Diamond
src/collectors/ipvs/ipvs.py
3
6009
# coding=utf-8 """ Shells out to get ipvs statistics, which may or may not require sudo access #### Dependencies * /usr/sbin/ipvsadmin """ import diamond.collector import subprocess import os import string from diamond.collector import str_to_bool class IPVSCollector(diamond.collector.Collector): def __ini...
mit
happyforhappy/shadowsocks-2
shadowsocks/udprelay.py
924
11154
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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
KaiSzuttor/espresso
samples/minimal-charged-particles.py
2
3404
# # Copyright (C) 2013-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
gpl-3.0
lukeiwanski/tensorflow
tensorflow/contrib/data/python/kernel_tests/reader_dataset_ops_test_base.py
11
11514
# 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
maryklayne/Funcao
sympy/polys/domains/finitefield.py
117
3306
"""Implementation of :class:`FiniteField` class. """ from __future__ import print_function, division from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDomain from sympy.polys.domains.groundtypes import SymPyInteger from sympy.polys.domains.modularinteger import ModularInte...
bsd-3-clause
hyperized/ansible
test/units/modules/network/f5/test_bigip_policy.py
22
4684
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 import os import json import pytest import sys if sys.version_info < (2, ...
gpl-3.0
gochaorg/mailscripts
emailer/mailer.py
1
12253
#!/usr/bin/python # -*- coding: utf-8 -*- import smtplib import os import re import sys import imaplib import email import tempfile import shutil import datetime import quopri import base64 import hashlib import quopri import base64 import hashlib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase imp...
mit
jgiovaresco/oh-my-zsh
plugins/git-prompt/gitstatus.py
492
2648
#!/usr/bin/env python from __future__ import print_function import sys import re import shlex from subprocess import Popen, PIPE, check_output def get_tagname_or_hash(): """return tagname if exists else hash""" cmd = 'git log -1 --format="%h%d"' output = check_output(shlex.split(cmd)).decode('utf-8').str...
mit
bukepo/openthread
tools/harness-automation/cases/router_9_2_12.py
18
1879
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 # notic...
bsd-3-clause
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/python/estimator/inputs/numpy_io.py
34
5107
# 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...
bsd-2-clause
noironetworks/group-based-policy
gbpservice/neutron/db/servicechain_db.py
1
30032
# 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
ritzk/ansible-modules-extras
cloud/amazon/ec2_vpc_dhcp_options.py
65
14933
#!/usr/bin/python # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be use...
gpl-3.0
mikewiebe-ansible/ansible
lib/ansible/modules/network/fortimanager/fmgr_secprof_ssl_ssh.py
39
39490
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
vzer/ToughRADIUS
toughradius/console/libs/pyforms/net.py
11
4922
#!/usr/bin/env python #coding:utf-8 __all__ = [ "validipaddr", "validipport", "validip", "validaddr", "urlquote", "httpdate", "parsehttpdate", "htmlquote", "htmlunquote", "websafe", ] import urllib, time try: import datetime except ImportError: pass def validipaddr(address): """ Returns True if `add...
agpl-3.0
nihlaeth/HorseLife
interface/cli/display.py
1
7394
"""Interface to inherit from for *Display classes.""" from textwrap import fill from core.core import Core from core.messagecore import MessageCore from core.stablecore import StableCore from core.pasturecore import PastureCore from core.towncore import TownCore from core.contractercore import ContracterCore from supp...
gpl-2.0
Spartronics4915/2016-Stronghold
src/org/usfirst/frc/team4915/stronghold/vision/jetson/imgExplore2/networktables2/client.py
6
11018
from . import _impl from .common import * from .connection import * from .entry import NetworkTableEntry from .networktablenode import NetworkTableNode from .type import NetworkTableEntryTypeManager import logging logger = logging.getLogger('nt') __all__ = ["NetworkTableClient"] class ClientConnectionState: ""...
mit
popazerty/test-gui
lib/python/Plugins/SystemPlugins/VideoClippingSetup/plugin.py
55
5625
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSlider, getConfigListEntry config.plugins.VideoClippingSetup = ConfigSubsection() config.plugins.VideoClippingSetup.clip_left = ConfigInteger(default = 0) co...
gpl-2.0
bratsche/Neutron-Drive
google_appengine/google/appengine/api/urlfetch.py
2
12870
#!/usr/bin/env python # # Copyright 2007 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 o...
bsd-3-clause
aarcro/VersionOne.SDK.Python
v1pysdk/v1meta.py
2
8955
try: from xml.etree import ElementTree except ImportError: from elementtree import ElementTree from client import * from base_asset import BaseAsset from cache_decorator import memoized from special_class_methods import special_classes from none_deref import NoneDeref from string_utils import split_attribute ...
bsd-3-clause
ClearCorp-dev/server-tools
__unported__/mail_environment/__openerp__.py
9
2106
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
samba-team/samba
source4/heimdal/lib/wind/gen-normalize.py
6
5756
#!/usr/local/bin/python # -*- coding: iso-8859-1 -*- # $Id$ # Copyright (c) 2004 Kungliga Tekniska Högskolan # (Royal Institute of Technology, Stockholm, Sweden). # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following...
gpl-3.0
caio2k/RIDE
src/robotide/editor/texteditor.py
2
21273
# Copyright 2008-2015 Nokia Solutions and Networks # # 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
mturilli/aimes.emanager
doc/conf.py
1
10732
# -*- coding: utf-8 -*- # # aimes.emanager documentation build configuration file, created by # sphinx-quickstart on Sat Nov 29 01:32:22 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
mit
jborean93/ansible
test/units/mock/loader.py
18
3881
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
arborh/tensorflow
tensorflow/python/kernel_tests/determinant_op_test.py
22
8503
# 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
blueboxgroup/ansible
contrib/inventory/landscape.py
405
3467
#!/usr/bin/env python # (c) 2015, Marc Abramowitz <marca@surveymonkey.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 # (...
gpl-3.0
75651/kbengine_cloud
kbe/res/scripts/common/Lib/distutils/tests/test_config_cmd.py
95
2602
"""Tests for distutils.command.config.""" import unittest import os import sys from test.support import run_unittest from distutils.command.config import dump_file, config from distutils.tests import support from distutils import log class ConfigTestCase(support.LoggingSilencer, support.TempdirMa...
lgpl-3.0
jasonyaw/SFrame
oss_src/unity/python/sframe/aggregate.py
9
7197
""" Builtin aggregators for SFrame groupby operator. """ ''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' def SUM(src_column): """ Builtin sum aggregator for groupby. Example: Get the ...
bsd-3-clause
pschmitt/home-assistant
tests/components/homekit/test_init.py
5
2112
"""Test HomeKit initialization.""" from homeassistant.components import logbook from homeassistant.components.homekit.const import ( ATTR_DISPLAY_NAME, ATTR_VALUE, DOMAIN as DOMAIN_HOMEKIT, EVENT_HOMEKIT_CHANGED, ) from homeassistant.const import ATTR_ENTITY_ID, ATTR_SERVICE from homeassistant.setup imp...
apache-2.0
forrestv/p2pool
p2pool/test/test_node.py
21
10812
from __future__ import division import base64 import random import tempfile from twisted.internet import defer, reactor from twisted.python import failure from twisted.trial import unittest from twisted.web import client, resource, server from p2pool import data, node, work, main from p2pool.bitcoin import data as b...
gpl-3.0
denisov-vlad/redash
redash/app.py
3
1686
from flask import Flask from werkzeug.middleware.proxy_fix import ProxyFix from . import settings class Redash(Flask): """A custom Flask app for Redash""" def __init__(self, *args, **kwargs): kwargs.update( { "template_folder": settings.FLASK_TEMPLATE_PATH, ...
bsd-2-clause
Brocade-OpenSource/OpenStack-DNRM-Neutron
neutron/tests/unit/openvswitch/test_openvswitch_plugin.py
13
2597
# 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...
apache-2.0
kjw0106/boto
boto/cloudsearch/optionstatus.py
185
8711
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
mit
ilayn/scipy
scipy/spatial/transform/tests/test_rotation_groups.py
21
5560
import pytest import numpy as np from numpy.testing import assert_array_almost_equal from scipy.spatial.transform import Rotation from scipy.optimize import linear_sum_assignment from scipy.spatial.distance import cdist from scipy.constants import golden as phi from scipy.spatial import cKDTree TOL = 1E-12 NS = rang...
bsd-3-clause
bigmlcom/python
bigml/predicate_utils/utils.py
2
10370
# -*- coding: utf-8 -*- # # Copyright 2020-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
ohnoimdead/horizon
django-openstack/setup.py
5
1875
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
bspink/django
django/contrib/sites/management.py
467
1564
""" Creates the default Site object. """ from django.apps import apps from django.conf import settings from django.core.management.color import no_style from django.db import DEFAULT_DB_ALIAS, connections, router def create_default_site(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs): ...
bsd-3-clause
rptec/seafile
scripts/check_init_admin.py
25
10867
#coding: UTF-8 '''This script would check if there is admin, and prompt the user to create a new one if non exist''' import sys import os import time import re import shutil import glob import subprocess import hashlib import getpass import uuid import warnings from ConfigParser import ConfigParser try: import ...
gpl-2.0
chafique-delli/OpenUpgrade
addons/stock_dropshipping/__openerp__.py
61
2042
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
sdotter/GPE-6.0.0
Documentation/target/tcm_mod_builder.py
4981
41422
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
terrencepreilly/darglint
darglint/parse/grammars/numpy_receives_section.py
1
5642
# Generated on 2020-04-04 11:23:51.675046 from darglint.token import ( TokenType, ) from darglint.parse.identifiers import ( NoqaIdentifier, ) from darglint.parse.grammar import ( BaseGrammar, P, ) class ReceivesGrammar(BaseGrammar): productions = [ P("receives-section", ([], "receives-h...
mit
weijiang8410/android-quill
jni/libhpdf-2.3.0RC2/if/python/hpdf_types.py
32
16746
### ## * << Haru Free PDF Library 2.0.3 >> -- hpdf_types.h ## * ## * URL http://libharu.org/ ## * ## * Copyright (c) 1999-2006 Takeshi Kanno ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that ...
gpl-3.0
umitproject/openmonitor-aggregator
django/contrib/gis/db/models/sql/aggregates.py
189
1738
from django.db.models.sql.aggregates import * from django.contrib.gis.db.models.fields import GeometryField class GeoAggregate(Aggregate): # Default SQL template for spatial aggregates. sql_template = '%(function)s(%(field)s)' # Conversion class, if necessary. conversion_class = None # Flags for ...
agpl-3.0
diogopaulo/kivyconfnav
Processes/ConfNavegacaoInserts.py
1
2790
def obtem_valor_bd(valor): if valor == None: return 'null' elif isinstance(valor, bool): return 1 if valor else 0 elif isinstance(valor, int): return valor else: return "'" + valor.replace("'", "''") + "'" class ConfNavegacaoInserts: def __init__(self, configuracoes...
lgpl-3.0
palashahuja/pgmpy
pgmpy/estimators/MLE.py
2
3259
from pgmpy.estimators import BaseEstimator from pgmpy.factors import TabularCPD from pgmpy.models import BayesianModel import numpy as np class MaximumLikelihoodEstimator(BaseEstimator): """ Class used to compute parameters for a model using Maximum Likelihood Estimate. Parameters ---------- mode...
mit
floooh/fips
colorama/ansitowin32.py
32
6709
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. import re import sys from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll winterm = None if windll is not None: winterm = WinTerm() def is_a_tty(stream): r...
mit
biblepay/biblepay
test/functional/timestampindex.py
2
2230
#!/usr/bin/env python3 # Copyright (c) 2014-2015 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 timestampindex generation and fetching # from test_framework.test_framework import BitcoinTestF...
mit
Fusion-Devices/android_kernel_samsung_manta
tools/perf/scripts/python/net_dropmonitor.py
1258
1562
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
saurabh6790/test_final_med_lib
website/doctype/contact_us_settings/templates/pages/contact.py
32
1606
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import now def get_context(): bean = webnotes.bean("Contact Us Settings", "Contact Us Settings") query_options = filter(None, bean.do...
mit
yongni/grpc
src/python/grpcio_tests/tests/unit/_thread_pool.py
27
1147
# Copyright 2016 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 law or agreed to in writing...
apache-2.0
gram526/VTK
Rendering/Tk/Testing/Python/TestTkRenderWindowInteractor.py
9
2083
import os, sys import vtk from vtk.test import Testing if sys.hexversion < 0x03000000: # for Python2 import Tkinter as tkinter from Tkinter import Pack else: # for Python3 import tkinter from tkinter import Pack from vtk.tk.vtkTkRenderWindowInteractor import vtkTkRenderWindowInteractor class...
bsd-3-clause
chuan9/chromium-crosswalk
tools/perf_expectations/update_perf_expectations.py
161
9833
#!/usr/bin/env python # 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. """Prepare tests that require re-baselining for input to make_expectations.py. The regularly running perf-AV tests require re-base...
bsd-3-clause
tboyce1/home-assistant
homeassistant/components/sensor/tradfri.py
5
3593
""" Support for the IKEA Tradfri platform. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.tradfri/ """ import asyncio import logging from datetime import timedelta from homeassistant.core import callback from homeassistant.components.tradfri imp...
apache-2.0
rongdede/ss
shadowsocks/common.py
945
8921
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0