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
gnarula/eden_deployment
modules/savage/graphics/shapes.py
24
24007
from base import Element, PositionableElement, BoxElement from group import Grouping from defs import Symbol, Use from utils import ViewBox from ..utils.struct import Vector as V, Matrix from math import sqrt, cos, sin from copy import deepcopy class Circle (PositionableElement): def __init__ (self, **attr): ...
mit
MihaiMoldovanu/ansible
lib/ansible/modules/network/nxos/nxos_vtp_version.py
13
5711
#!/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
jasonwee/asus-rt-n14uhp-mrtg
tmp/ve_asus-rt-n14uhp-mrtg/lib/python3.4/site-packages/django/db/models/aggregates.py
65
6528
""" Classes to represent the definitions of aggregate functions. """ from django.core.exceptions import FieldError from django.db.models.expressions import Func, Star from django.db.models.fields import FloatField, IntegerField __all__ = [ 'Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance', ] ...
apache-2.0
totallybradical/temp_servo2
tests/wpt/css-tests/tools/html5lib/html5lib/filters/whitespace.py
1730
1142
from __future__ import absolute_import, division, unicode_literals import re from . import _base from ..constants import rcdataElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) class Filter(_base.Filter): spacePreserveElements = frozenset...
mpl-2.0
nagyistoce/edx-platform
lms/djangoapps/bulk_email/forms.py
92
4591
""" Defines a form for providing validation of CourseEmail templates. """ import logging from django import forms from django.core.exceptions import ValidationError from bulk_email.models import CourseEmailTemplate, COURSE_EMAIL_MESSAGE_BODY_TAG, CourseAuthorization from opaque_keys import InvalidKeyError from xmodu...
agpl-3.0
Ahmad31/Web_Flask_Cassandra
flask/lib/python2.7/site-packages/wtforms/utils.py
194
1504
class UnsetValue(object): """ An unset value. This is used in situations where a blank value like `None` is acceptable usually as the default value of a class variable or function parameter (iow, usually when `None` is a valid value.) """ def __str__(self): return '<unset value>' ...
apache-2.0
sivel/ansible-modules-extras
network/illumos/dladm_etherstub.py
48
4629
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@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 L...
gpl-3.0
kerr-huang/SL4A
python-build/python-libs/python-twitter/twitter.py
89
70251
#!/usr/bin/python2.4 # # Copyright 2007 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...
apache-2.0
CalvinNeo/EasyMLPlatform
py/graphic/tree.py
1
4067
#coding:utf8 import numpy as np import math import pylab as pl import matplotlib.cm as cm import matplotlib.mlab as mlab import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import json class GraphTree: def __init__(self): self.jsonobj = {} self.leafNode = dict(boxstyle = 'roun...
apache-2.0
dfalt974/SickRage
lib/rebulk/validators.py
33
1589
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Validator functions to use in patterns. All those function have last argument as match, so it's possible to use functools.partial to bind previous arguments. """ def chars_before(chars, match): """ Validate the match if left character is in a given sequence. ...
gpl-3.0
khiner/aubio
python/demos/demo_waveform_plot.py
10
2099
#! /usr/bin/env python import sys from aubio import pvoc, source from numpy import zeros, hstack def get_waveform_plot(filename, samplerate = 0, block_size = 4096, ax = None, downsample = 2**4): import matplotlib.pyplot as plt if not ax: fig = plt.figure() ax = fig.add_subplot(111) hop_s =...
gpl-3.0
archf/ansible
lib/ansible/modules/network/netscaler/netscaler_gslb_site.py
27
14153
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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', ...
gpl-3.0
dgoodwin/origin
vendor/github.com/google/certificate-transparency/cpp/server/ct-dns-server-test.py
33
10792
import base64 import dns.resolver import dns.rdatatype import logging import math import os import random import shlex import signal import subprocess import sys import time NUMBER_OF_CERTS = 100 basepath = os.path.dirname(sys.argv[0]) sys.path.append(os.path.join(basepath, '../../python')) from ct.crypto import mer...
apache-2.0
rbruyere/appengine-mapreduce
python/test/mapreduce gcs/pipeline/status_ui.py
6
6317
#!/usr/bin/env python # # Copyright 2010 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...
apache-2.0
deplinenoise/rlaunch
vbcc-driver.py
1
1297
#! /usr/bin/python import sys import os import os.path import subprocess import re line_re = re.compile(r'^(warning|error) (\d+) in line (\d+) of "([^"]*)":\s*(.*)$') def fix_fn(root_dir, fn): # If there are path separators in the filename, assume the path is valid if fn.find(os.sep) != -1: return fn if os.pa...
gpl-3.0
fjxhkj/PTVS
Python/Tests/TestData/VirtualEnv/env/Lib/codecs.py
84
36364
""" codecs -- Python Codec Registry, API and helpers. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import __builtin__, sys ### Registry and builtin stateless codec functions try: from _codecs import * except ImportError, why: ...
apache-2.0
sajavadi/pinot
pinot-dashboard/pinotui/config.py
17
2368
#!/usr/bin/env python2.6 # # Copyright (C) 2015 LinkedIn Corp. (pinot-core@linkedin.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
apache-2.0
awylie/hadoop
src/contrib/hod/hodlib/Common/xmlrpc.py
182
2374
#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
asajeffrey/servo
tests/power/PowerMeasure.py
5
7013
#!/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 https://mozilla.org/MPL/2.0/. # ---------Power measurement ------------------------------# # This script will run the servo w...
mpl-2.0
ltilve/chromium
third_party/python_gflags/gflags.py
448
104236
#!/usr/bin/env python # # Copyright (c) 2002, 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 ...
bsd-3-clause
alivecor/tensorflow
tensorflow/examples/speech_commands/freeze_test.py
48
1474
# 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
Anwesh43/numpy
numpy/core/tests/test_indexerrors.py
145
4938
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import TestCase, run_module_suite, assert_raises class TestIndexErrors(TestCase): '''Tests to exercise indexerrors not covered by other tests.''' def test_arraytypes_fasttake(self): 'take from a 0-l...
bsd-3-clause
Just-D/chromium-1
tools/run-bisect-manual-test.py
9
6350
#!/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. """Run Manual Test Bisect Tool An example usage: tools/run-bisect-manual-test.py -g 201281 -b 201290 On Linux platform, follow the in...
bsd-3-clause
Ziqi-Li/bknqgis
pandas/pandas/tests/io/test_packers.py
7
31902
import pytest from warnings import catch_warnings import os import datetime import numpy as np import sys from distutils.version import LooseVersion from pandas import compat from pandas.compat import u, PY3 from pandas import (Series, DataFrame, Panel, MultiIndex, bdate_range, date_range, period_...
gpl-2.0
sgerhart/ansible
lib/ansible/plugins/callback/unixy.py
14
8485
# Copyright: (c) 2017, Allyson Bowles <@akatch> # Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclas...
mit
jeffzheng1/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/pandas_io.py
14
3569
# 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
raccoongang/edx-platform
common/djangoapps/track/views/__init__.py
23
6545
import datetime import json import pytz from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import redirect from django.views.decorators.csrf import ensure_csrf_cookie from edxmako.shortcuts import render_to_response from ipware.ip import get_ip from...
agpl-3.0
thefab/tornadis
tornadis/pool.py
1
7269
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of tornadis library released under the MIT license. # See the LICENSE file for more information. import tornado.gen import tornado.ioloop import tornado.locks import logging import functools from collections import deque from tornadis.client import C...
mit
masayukig/tempest
tempest/tests/lib/services/compute/test_servers_client.py
3
36247
# Copyright 2015 IBM Corp. # Copyright 2017 AT&T Corp. # # 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
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_virtual_network_taps_operations.py
1
29661
# 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 may ...
mit
wonder-sk/inasafe
safe/storage/utilities.py
2
37736
# coding=utf-8 """**Utilities for storage module** """ import os import re import copy import numpy import math from ast import literal_eval from osgeo import ogr from collections import OrderedDict from geometry import Polygon from safe.gis.numerics import ensure_numeric from safe.common.utilities import verify from...
gpl-3.0
dapeng0802/djangocms-blog
tests/test_views.py
8
10836
# -*- coding: utf-8 -*- from django.contrib.auth.models import AnonymousUser from django.http import Http404 from django.utils.timezone import now from django.utils.translation import activate from djangocms_blog.feeds import LatestEntriesFeed, TagFeed from djangocms_blog.sitemaps import BlogSitemap from djangocms_blog...
bsd-3-clause
xfguo/skyeye
gui/wxpython/dialogs_xrc.py
3
21837
# This file was automatically generated by pywxrc. # -*- coding: UTF-8 -*- import wx import wx.xrc as xrc import os import wx.grid __res = None def get_resources(): """ This function provides access to the XML resources in this module.""" global __res if __res == None: __init_resources() re...
gpl-2.0
zimmerle/gnuradio
gr-digital/python/qa_map.py
8
1784
#!/usr/bin/env python # # Copyright 2012 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) ...
gpl-3.0
whip112/Whip112
vendor/packages/pygments/formatters/__init__.py
44
3597
# -*- coding: utf-8 -*- """ pygments.formatters ~~~~~~~~~~~~~~~~~~~ Pygments formatters. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import types import fnmatch from os.path import basename from pygments.form...
mpl-2.0
arabenjamin/pybrain
pybrain/tools/plotting/fitnesslandscapes.py
31
3853
# some utility code for nicely plotting 3D images of function fitness landscapes. __author__ = 'Tom Schaul, tom@idsia.ch' from scipy import zeros, r_, cos, sin, pi, array, dot, sqrt, diag from scipy.linalg import svd from pylab import figure, plot, show, meshgrid, contour, savefig, colorbar from pybrain.rl.environmen...
bsd-3-clause
felipeZ/nonAdiabaticCoupling
nac/integrals/nonAdiabaticCoupling.py
1
5341
__all__ = ['calculate_couplings_3points', 'calculate_couplings_levine', 'compute_overlaps_for_coupling', 'correct_phases'] from compute_integrals import compute_integrals_couplings from nac.common import ( Matrix, Tensor3D, retrieve_hdf5_data, tuplesXYZ_to_plams) from os.path import join import numpy as...
mit
evamwangi/bc-7-Todo_List
venv/Lib/encodings/hex_codec.py
528
2309
""" Python 'hex_codec' Codec - 2-digit hex content transfer 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, binascii ### Codec APIs def hex_encode(...
mit
fnordahl/nova
nova/tests/unit/virt/libvirt/storage/test_rbd.py
12
13996
# 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
Gillu13/scipy
scipy/sparse/linalg/isolve/lgmres.py
3
11059
# Copyright (C) 2009, Pauli Virtanen <pav@iki.fi> # Distributed under the same license as Scipy. from __future__ import division, print_function, absolute_import import numpy as np from scipy._lib.six import xrange from scipy.linalg import get_blas_funcs, get_lapack_funcs, qr_insert from .utils import make_system __...
bsd-3-clause
jmesteve/medical
openerp/addons/stock/wizard/stock_inventory_line_split.py
64
4976
# -*- 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
nuncjo/odoo
addons/account_analytic_plans/report/__init__.py
445
1084
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
jamiebull1/eppy
docs/Outputs_Tutorial.py
3
11037
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Reading outputs from E+ # <codecell> # some initial set up # if you have not installed epp, and only downloaded it # you will need the following lines import sys # pathnameto_eppy = 'c:/eppy' pathnameto_eppy = '../' sys.path.append(pathnam...
mit
wkerzendorf/wsynphot
wsynphot/base.py
1
15987
# defining the base filter curve classes import os from scipy import interpolate from wsynphot.spectrum1d import SKSpectrum1D as Spectrum1D import pandas as pd from wsynphot.io.cache_filters import load_filter_index, load_transmission_data from astropy import units as u, constants as const from astropy import uti...
bsd-3-clause
agry/NGECore2
scripts/mobiles/tatooine/gunrunner_sentry.py
2
1353
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() mobi...
lgpl-3.0
ChrisTimperley/PythonCGum
cgum/program.py
1
5861
from cgum.basic import * from cgum.utility import FNULL from pprint import pprint import cgum.statement as statement import cgum.expression as expression import cgum.preprocessor as preprocessor import cgum.typs as typs from subprocess import Popen, CalledProcessError import os.path import json import tempfile import ...
mit
h2o64/android_kernel_motorola_msm8226-3.10
tools/perf/util/setup.py
2079
1438
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
totemtang/hadoop-RHJoin
src/contrib/hod/hodlib/Common/threads.py
182
12248
#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
invisiblek/python-for-android
python-modules/twisted/twisted/mail/test/test_mailmail.py
54
2688
# Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.mail.scripts.mailmail}, the implementation of the command line program I{mailmail}. """ import sys from StringIO import StringIO from twisted.trial.unittest import TestCase from twisted.mail.scripts.mailmail import p...
apache-2.0
KyleAMoore/KanjiNani
Android/.buildozer/android/platform/build/build/other_builds/kivy-python3crystax-sdl2/armeabi-v7a/kivy/kivy/input/providers/mactouch.py
21
7204
''' Native support of MultitouchSupport framework for MacBook (MaxOSX platform) =========================================================================== ''' __all__ = ('MacMotionEventProvider', ) import ctypes import threading import collections import os from kivy.input.provider import MotionEventProvider from ki...
gpl-3.0
tommytarts/QuantumKernelM8-GPe
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
Bulochkin/tensorflow_pack
tensorflow/contrib/distributions/python/ops/deterministic.py
64
13215
# 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
greenonion/pytvd
tvdip.py
1
8146
""" tvdip.py ~~~~~~~~ This module is a direct port of the original [1] tvdip Matlab script into NumPy. [1] M.A. Little, Nick S. Jones (2010) "Sparse Bayesian Step-Filtering for High- Throughput Analysis of Molecular Machine Dynamics", in 2010 IEEE International Conference on Acoustics, Speech and Signal Processing, 2...
gpl-2.0
adrienbrault/home-assistant
tests/components/canary/test_sensor.py
8
7215
"""The tests for the Canary sensor platform.""" from datetime import timedelta from unittest.mock import patch from homeassistant.components.canary.const import DOMAIN, MANUFACTURER from homeassistant.components.canary.sensor import ( ATTR_AIR_QUALITY, STATE_AIR_QUALITY_ABNORMAL, STATE_AIR_QUALITY_NORMAL, ...
mit
t1m0thy/autograd
autograd/numpy/numpy_grads.py
4
18791
from __future__ import absolute_import import operator as op from autograd.core import getval from . import numpy_wrapper as anp from .numpy_extra import ArrayNode, take import six from six.moves import range from six.moves import zip # ----- Functions that are constant w.r.t. continuous inputs ----- anp.floor.defgr...
mit
andreas-kowasch/DomainSearch
DomainSearchViewer/modules/RobotsTxt.py
2
4113
# -*- coding: utf-8 -*- """ Module for loadiing the robots.txt file """ import re import socket from http import client from modules import DatasourceBase from modules import ModuleError ################################################################################ class RobotsTxt(DatasourceBase): """ Th...
bsd-2-clause
Adarnof/allianceauth
allianceauth/eveonline/migrations/0001_initial.py
6
3197
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-05 21:39 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
gpl-2.0
Hitechverma/zamboni
mkt/webapps/indexers.py
1
19450
from operator import attrgetter from django.core.urlresolvers import reverse from django.db.models import Min import commonware.log from elasticsearch_dsl import F from elasticsearch_dsl.filter import Bool import mkt from mkt.constants import APP_FEATURES from mkt.constants.applications import DEVICE_GAIA from mkt.p...
bsd-3-clause
tobykurien/MakerDroid
assetsrc/public.mp3/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/gts.py
1
4561
""" This page is in the table of contents. The gts.py script is an import translator plugin to get a carving from an gts file. An import plugin is a script in the interpret_plugins folder which has the function getCarving. It is meant to be run from the interpret tool. To ensure that the plugin works on platforms wh...
gpl-3.0
DarkFenX/Pyfa
eos/saveddata/targetProfile.py
1
20115
# =============================================================================== # Copyright (C) 2014 Ryan Holmes # # This file is part of eos. # # eos 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, e...
gpl-3.0
crosswalk-project/chromium-crosswalk-efl
tools/site_compare/commands/measure.py
189
1573
# Copyright (c) 2011 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 for measuring how long pages take to load in a browser. Prerequisites: 1. The command_line package from tools/site_compare 2. Either the ...
bsd-3-clause
mozilla/stoneridge
python/src/Lib/test/test_pprint.py
71
24693
import pprint import test.test_support import unittest import test.test_set try: uni = unicode except NameError: def uni(x): return x # list, tuple and dict subclasses that do or don't overwrite __repr__ class list2(list): pass class list3(list): def __repr__(self): return list.__repr...
mpl-2.0
gedare/gem5
src/arch/x86/isa/insts/system/invlpg.py
84
2383
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
bsd-3-clause
Tchanders/socorro
socorro/cron/jobs/truncate_partitions.py
9
1248
# 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/. from configman import Namespace from crontabber.base import BaseCronApp from crontabber.mixins import ( with_postgre...
mpl-2.0
Fat-Zer/FreeCAD_sf_master
src/Mod/Raytracing/InitGui.py
18
2544
# Raytracing gui init module # (c) 2003 Juergen Riegel # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up #*************************************************************************** #* Copyright (c) 2002 Juergen Riegel <...
lgpl-2.1
HackPartners/bigdatadarwin
tests/test_schedule.py
2
3060
import os import sys sys.path.append(os.getcwd()) import pytest import darwinpush.xb.pushport as pp from darwinpush.messagefactories.xml import ScheduleXMLMessageFactory import datetime # set environment variables to the test database try_envs = ["DARWINPUSH_DBUSER", "DARWINPUSH_DBPASS", "DARWINPUSH_DBNAME"] for k ...
apache-2.0
tkingless/webtesting
venvs/tutorials/lib/python2.7/site-packages/pip/commands/search.py
78
4816
from __future__ import absolute_import import logging import sys import textwrap from pip.basecommand import Command, SUCCESS from pip.download import PipXmlrpcTransport from pip.models import PyPI from pip.utils import get_terminal_size from pip.utils.logging import indent_log from pip.exceptions import CommandError...
mit
yousafsyed/casperjs
bin/Lib/site-packages/setuptools/tests/test_packageindex.py
377
7625
"""Package Index Tests """ import sys import os import unittest import pkg_resources from setuptools.compat import urllib2, httplib, HTTPError, unicode, pathname2url import distutils.errors import setuptools.package_index from setuptools.tests.server import IndexServer class TestPackageIndex(unittest.TestCase): d...
mit
MakeHer/edx-platform
common/lib/xmodule/xmodule/backcompat_module.py
204
3681
""" These modules exist to translate old format XML into newer, semantic forms """ from .x_module import XModuleDescriptor from lxml import etree from functools import wraps import logging import traceback log = logging.getLogger(__name__) def process_includes(fn): """ Wraps a XModuleDescriptor.from_xml meth...
agpl-3.0
mdanielwork/intellij-community
python/lib/Lib/encodings/mac_greek.py
593
13977
""" Python Character Mapping Codec mac_greek generated from 'MAPPINGS/VENDORS/APPLE/GREEK.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,err...
apache-2.0
hoosteeno/mozillians
vendor-local/lib/python/tablib/packages/yaml/composer.py
534
4921
__all__ = ['Composer', 'ComposerError'] from error import MarkedYAMLError from events import * from nodes import * class ComposerError(MarkedYAMLError): pass class Composer(object): def __init__(self): self.anchors = {} def check_node(self): # Drop the STREAM-START event. if se...
bsd-3-clause
napalm-automation/napalm-yang
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs_/bandwidth_constraints/__init__.py
1
12844
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
apache-2.0
yvaucher/account-invoicing
__unported__/invoice_line_description/invoice.py
3
2572
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
agpl-3.0
hivelocity/python-namecheap
setup.py
3
2314
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2011, Martín Raúl Villalba # # 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 So...
mit
sserrot/champion_relationships
venv/Lib/site-packages/ipykernel/inprocess/blocking.py
1
3068
""" Implements a fully blocking kernel client. Useful for test suites and blocking terminal interfaces. """ #----------------------------------------------------------------------------- # Copyright (C) 2012 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # ...
mit
jamespcole/home-assistant
homeassistant/components/owlet/binary_sensor.py
8
2346
"""Support for Owlet binary sensors.""" from datetime import timedelta from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.util import dt as dt_util from . import DOMAIN as OWLET_DOMAIN from .const import SENSOR_BASE_STATION, SENSOR_MOVEMENT SCAN_INTERVAL = timedelta(seconds=120)...
apache-2.0
s20121035/rk3288_android5.1_repo
external/chromium_org/build/gn_helpers.py
117
1344
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Helper functions useful when writing scripts that are run from GN's exec_script function.""" class GNException(Exception): pass def ToGNString(value,...
gpl-3.0
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtGui/QFontMetricsF.py
2
5505
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QFontMetricsF(): # skipped bases: <type 'sip.simplewrapper'> """ QFontMetricsF(QFont) QFontMetricsF(QFont, QPaintDevice) QF...
gpl-2.0
JNRowe/shell-doctest
shelldoctest/shelldoctest.py
1
8293
#!/usr/bin/env python """ Shell Doctest module. :Copyright: (c) 2009, the Shell Doctest Team All rights reserved. :license: BSD, see LICENSE for more details. """ import commands import doctest import inspect import re import subprocess import sys master = None _EXC_WRAPPER = 'system_command("%s")' def system_comma...
bsd-3-clause
EUDAT-B2SHARE/invenio-old
modules/bibformat/lib/elements/bfe_report_numbers.py
17
2526
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 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 ## Licens...
gpl-2.0
imsparsh/python-for-android
python-modules/twisted/twisted/manhole/service.py
62
12946
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """L{twisted.manhole} L{PB<twisted.spread.pb>} service implementation. """ # twisted imports from twisted import copyright from twisted.spread import pb from twisted.python import log, failure from twisted.cred import portal from twis...
apache-2.0
jhcepas/npr
nprlib/argparse.py
490
87791
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
gpl-3.0
mambocab/cassandra-dtest
plugins/dtestconfig.py
7
1418
from collections import namedtuple from nose import plugins # A class that defines the attributes that have to be defined for configuring # a dtest run. namedtuple does what we want -- it's immutable and requires # all the attributes to be passed in to be instantiated. GlobalConfigObject = namedtuple('GlobalConfigObj...
apache-2.0
byterom/android_external_chromium_org
tools/cygprofile/patch_orderfile.py
43
3978
#!/usr/bin/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. import commands import os import sys orderfile = sys.argv[1] uninstrumented_shlib = sys.argv[2] nmlines_uninstrumented = commands.getoutp...
bsd-3-clause
PriceChild/ansible
lib/ansible/modules/storage/infinidat/infini_vol.py
69
4675
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Gregory Shulov (gregory.shulov@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...
gpl-3.0
alfa-addon/addon
plugin.video.alfa/channels/vi2.py
1
11788
# -*- coding: utf-8 -*- # -*- Channel Vi2.co -*- # -*- Created for Alfa-addon -*- # -*- By the Alfa Develop Group -*- import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int import re import base64 from channelselector import get_thumb from core import htt...
gpl-3.0
jonathonwalz/ansible
lib/ansible/modules/network/eos/eos_command.py
58
7620
#!/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
dhruvparamhans/fuel
fuel/datasets/text.py
21
4353
from picklable_itertools import iter_, chain from fuel.datasets import Dataset class TextFile(Dataset): r"""Reads text files and numberizes them given a dictionary. Parameters ---------- files : list of str The names of the files in order which they should be read. Each file is expec...
mit
alduxvm/pyMultiWii
pymultiwii/__init__.py
1
17209
#!/usr/bin/env python """multiwii.py: Handles Multiwii Serial Protocol.""" __author__ = "Aldo Vargas" __copyright__ = "Copyright 2017 Altax.net" __license__ = "GPL" __version__ = "1.6" __maintainer__ = "Aldo Vargas" __email__ = "alduxvm@gmail.com" __status__ = "Development" import serial, time, struct class Mult...
gpl-3.0
alextsui05/gmock
gtest/scripts/fuse_gtest_files.py
2577
8813
#!/usr/bin/env python # # Copyright 2009, 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
ryfeus/lambda-packs
pytorch/source/caffe2/python/transformations_test.py
1
12467
# Copyright (c) 2016-present, Facebook, 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 agreed...
mit
DecipherOne/Troglodyte
Trog Build Dependencies/Python26/Lib/test/buffer_tests.py
61
10504
# Tests that work for both bytes and buffer objects. # See PEP 3137. import struct import sys class MixinBytesBufferCommonTests(object): """Tests that work for both bytes and buffer objects. See PEP 3137. """ def marshal(self, x): """Convert x into the appropriate type for these tests.""" ...
mit
mio-to/cnambot
simulations/cnambot/cyr_demo02.py
1
2268
from morse.builder import * # Land robot morsy = Morsy() morsy.translate(2.25, -0.75) pose = Pose() pose.translate(x=-0.0, z=0.0) morsy.append(pose) gripper = Gripper() gripper.translate(x=0.2000, z=0.5000) gripper.properties(Angle=360.0, Distance=0.5); morsy.append(gripper) camera = VideoCamera() camera.translate(...
gpl-2.0
mancoast/CPythonPyc_test
fail/331_test_code_module.py
32
2478
"Test InteractiveConsole and InteractiveInterpreter from code module" import sys import unittest from contextlib import ExitStack from unittest import mock from test import support code = support.import_module('code') class TestInteractiveConsole(unittest.TestCase): def setUp(self): self.console = code....
gpl-3.0
WPMedia/dd-agent
checks.d/directory.py
9
4748
# (C) Datadog, Inc. 2013-2016 # (C) Brett Langdon <brett@blangdon.com> 2013 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from fnmatch import fnmatch from os import stat from os.path import abspath, exists, join import time # 3p from scandir import walk # project from checks i...
bsd-3-clause
sadimusi/mc4p
mc4p/encryption.py
2
4012
# -*- coding: utf-8 -*- # This source file is part of mc4p, # the Minecraft Portable Protocol-Parsing Proxy. # # Copyright (C) 2011 Matthew J. McGill, Simon Marti # This program is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redistribute it # and/or modify it und...
gpl-2.0
Aravinthu/odoo
addons/mrp_repair/models/mrp_repair.py
4
32545
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from odoo import api, fields, models, _ from odoo.addons import decimal_precision as dp from odoo.exceptions import UserError, ValidationError from odoo.tools import float_compare class S...
agpl-3.0
arsfeld/conduit
conduit/modules/ShutterflyModule/ShutterflyModule.py
1
3532
""" Shutterfly Data Sink """ import logging log = logging.getLogger("modules.Shutterfly") import conduit import conduit.utils as Utils from conduit.datatypes import Rid import conduit.dataproviders.Image as Image import conduit.Exceptions as Exceptions import conduit.datatypes.Photo as Photo Utils.dataprovider_add_di...
gpl-2.0
totallybradical/temp_servo2
tests/wpt/css-tests/css-text-decor-3_dev/xhtml1/reference/support/generate-text-emphasis-style-property-tests.py
841
3434
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-style-property-011 ~ 020 which cover all possible values of text-emphasis-style property, except none and <string>, with horizontal writing mode. It outputs a list of all tests it generated in the format of Mozilla reftest....
mpl-2.0
ybayle/ReproducibleResearchIEEE2017
src/svmbff.py
1
22789
# -*- coding: utf-8 -*- #!/usr/bin/python # # Author Yann Bayle # E-mail bayle.yann@live.fr # License MIT # Created 13/10/2016 # Updated 20/01/2017 # Version 1.0.0 # """ Description of svmbff.py ====================== bextract -mfcc -zcrs -ctd -rlf -flx -ws 1024 -as 898 -sv -fe filename.mf -w out.arff ...
mit